diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/ActivePointTotalResultDTO.java b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/ActivePointTotalResultDTO.java new file mode 100644 index 000000000..23fdcd152 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/ActivePointTotalResultDTO.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dto.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 积分记录表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2021-09-23 + */ +@Data +public class ActivePointTotalResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + + /** + * 用户姓名 + */ + private String userName; + + /** + * 积分操作类型(0-减积分,1-加积分) + */ +// private String operationType; +// private String operationTypeName; + + /** + * 积分 + */ + private Integer points; + + + /** + * 操作描述 + */ + private String operationDesc; + + + +} diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java index 284f83122..f1ecffca2 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/ActivePointLogController.java @@ -28,7 +28,9 @@ import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; import com.elink.esua.epdc.dao.ActivePointLogDao; import com.elink.esua.epdc.dto.ActivePointLogDTO; import com.elink.esua.epdc.dto.form.PointLogFormDTO; +import com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO; import com.elink.esua.epdc.excel.ActivePointLogExcel; +import com.elink.esua.epdc.excel.ActivePointLogTotalExcel; import com.elink.esua.epdc.service.ActivePointLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -98,6 +100,20 @@ public class ActivePointLogController { ExcelUtils.exportExcelToTarget(response, null, list, ActivePointLogExcel.class); } + /** + * 统计导出 + * @param params + * @param response + * @throws Exception + */ + @GetMapping("exportTotal") + public void exportTotal(@RequestParam Map params, HttpServletResponse response) throws Exception { + + List list = activePointLogService.exportTotal(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ActivePointLogTotalExcel.class); + } + /*** * 积分操作 * @param formDTO diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java index c28a3daf5..67ea30be7 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/ActivePointLogDao.java @@ -20,6 +20,7 @@ package com.elink.esua.epdc.dao; import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; import com.elink.esua.epdc.dto.ActivePointLogDTO; import com.elink.esua.epdc.dto.form.PointLogFormDTO; +import com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO; import com.elink.esua.epdc.entity.ActivePointLogEntity; import org.apache.ibatis.annotations.Mapper; @@ -82,4 +83,13 @@ public interface ActivePointLogDao extends BaseDao { */ Integer getTotal(Map params); + + /** + * 条件查询 + * + * @param params + * @return + */ + List exportTotal(Map params); + } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/excel/ActivePointLogTotalExcel.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/excel/ActivePointLogTotalExcel.java new file mode 100644 index 000000000..a1ba0a70e --- /dev/null +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/excel/ActivePointLogTotalExcel.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 积分记录表 + * + * @author elink elink@elink-cn.com + * @since v1.0.0 2021-09-23 + */ +@Data +public class ActivePointLogTotalExcel { + + + + @Excel(name = "用户姓名") + private String userName; + + @Excel(name = "操作描述") + private String operationDesc; + + @Excel(name = "积分") + private Integer points; + + + + + + +} diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java index 04555f434..021a74008 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/ActivePointLogService.java @@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService; import com.elink.esua.epdc.commons.tools.page.PageData; import com.elink.esua.epdc.dto.ActivePointLogDTO; import com.elink.esua.epdc.dto.form.PointLogFormDTO; +import com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO; import com.elink.esua.epdc.entity.ActivePointLogEntity; import java.util.List; @@ -125,4 +126,6 @@ public interface ActivePointLogService extends BaseService * @return */ Integer getTotal(Map params); + + List exportTotal(Map params); } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java index ae306350b..18d35ddc6 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/ActivePointLogServiceImpl.java @@ -32,6 +32,7 @@ import com.elink.esua.epdc.dto.ActivePointLogDTO; import com.elink.esua.epdc.dto.form.PointLogFormDTO; import com.elink.esua.epdc.dto.form.PointRuleFormDTO; import com.elink.esua.epdc.dto.form.UserPointsFormDTO; +import com.elink.esua.epdc.dto.result.ActivePointTotalResultDTO; import com.elink.esua.epdc.dto.result.EpdcUserInfoResultDTO; import com.elink.esua.epdc.dto.result.UserPointInfo; import com.elink.esua.epdc.entity.ActivePointLogEntity; @@ -231,4 +232,12 @@ public class ActivePointLogServiceImpl extends BaseServiceImpl exportTotal(Map params) { + + List list = baseDao.exportTotal(params); + + return list; + } } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml index 91f7d4902..bec094e19 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/ActivePointLogDao.xml @@ -135,5 +135,34 @@ and OPERATION_DESC like '%' #{operationDesc} '%' + + +