diff --git a/src/main/java/com/sqx/modules/operatorsLog/controller/AdminOperatorsLogController.java b/src/main/java/com/sqx/modules/operatorsLog/controller/AdminOperatorsLogController.java index 8240934..f829506 100644 --- a/src/main/java/com/sqx/modules/operatorsLog/controller/AdminOperatorsLogController.java +++ b/src/main/java/com/sqx/modules/operatorsLog/controller/AdminOperatorsLogController.java @@ -2,14 +2,19 @@ package com.sqx.modules.operatorsLog.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.sqx.common.utils.Result; import com.sqx.modules.operatorsLog.entity.OperatorsLog; import com.sqx.modules.operatorsLog.service.OperatorsLogService; +import com.sqx.modules.pay.entity.PayDetails; +import com.sqx.modules.utils.EasyPoi.ExcelUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.servlet.http.HttpServletResponse; + /** *

* 前端控制器 @@ -31,6 +36,13 @@ public class AdminOperatorsLogController { return Result.success().put("data", operatorsLogService.getOperatorsLogList(page, limit, operatorsLog)); } + @GetMapping("/operatorsLogListExcel") + @ApiOperation("压桶修改日志列表导出") + public void operatorsLogListExcel(Integer page, Integer limit, OperatorsLog operatorsLog, HttpServletResponse response) throws Exception { + IPage operatorsLogList = operatorsLogService.getOperatorsLogList(page, limit, operatorsLog); + ExcelUtils.exportExcel(operatorsLogList.getRecords(), "押桶记录", "押桶记录", OperatorsLog.class, "押桶记录", response); + } + @RequestMapping(value = "deleteLogById") @ApiOperation("根据id删除日志") public Result deleteLogById(Long logId) { diff --git a/src/main/java/com/sqx/modules/operatorsLog/entity/OperatorsLog.java b/src/main/java/com/sqx/modules/operatorsLog/entity/OperatorsLog.java index 5cd8ef6..2dc952c 100644 --- a/src/main/java/com/sqx/modules/operatorsLog/entity/OperatorsLog.java +++ b/src/main/java/com/sqx/modules/operatorsLog/entity/OperatorsLog.java @@ -1,5 +1,6 @@ package com.sqx.modules.operatorsLog.entity; +import cn.afterturn.easypoi.excel.annotation.Excel; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.SqlCondition; import com.baomidou.mybatisplus.annotation.TableField; @@ -27,6 +28,7 @@ public class OperatorsLog implements Serializable { * 日志id */ @TableId(value = "log_id", type = IdType.AUTO) + @Excel(name = "日志id") private Long logId; /** @@ -42,11 +44,13 @@ public class OperatorsLog implements Serializable { /** * 修改人昵称 */ + @Excel(name = "修改人") @TableField(condition = SqlCondition.LIKE) private String updateUserName; /** * 修改人手机号码 */ + @Excel(name = "修改人手机号码") private String updateUserPhone; /** * 用户id @@ -56,40 +60,48 @@ public class OperatorsLog implements Serializable { /** * 用户昵称 */ + @Excel(name = "用户昵称") @TableField(condition = SqlCondition.LIKE) private String userName; /** * 用户手机号码 */ + @Excel(name = "用户手机号码") private String userPhone; /** * 用户上一次压桶数 */ + @Excel(name = "用户上一次压桶数") private Integer lastBucket; /** * 1增加 2减少 */ + @Excel(name = "操作类型") private Integer operator; /** * 修改数量 */ + @Excel(name = "修改数量") private Integer operatorNum; /** * 0待审核 1已通过 2已拒绝 */ + @Excel(name = "操作状态") private Integer status; /** * 修改后的压桶数 */ + @Excel(name = "修改后的压桶数") private Integer nextBucket; /** * 修改时间 */ + @Excel(name = "修改时间") private Date updateTime;