diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogListFormDTO.java b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogListFormDTO.java new file mode 100644 index 000000000..1d8e82b97 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/form/PointsLogListFormDTO.java @@ -0,0 +1,56 @@ +/** + * 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.form; + +import lombok.Data; + +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * 居民端-积分记录 + * + * @author wgf + * @since v1.0.0 2021-09-23 + */ +@Data +public class PointsLogListFormDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 页码,从1开始 + */ + @Min(value = 1, message = "页码必须大于0") + private int pageIndex; + + /** + * 页容量,默认20页 + */ + @Min(value = 1, message = "每页条数必须大于必须大于0") + private int pageSize = 10; + + /** + * 第一页查询发起时的时间 + */ + @NotBlank(message = "时间戳不能为空") + private String timestamp; + +} diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/PointsLogListResultDTO.java b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/PointsLogListResultDTO.java new file mode 100644 index 000000000..f554fb0f8 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-client/src/main/java/com/elink/esua/epdc/dto/result/PointsLogListResultDTO.java @@ -0,0 +1,65 @@ +/** + * 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; + + +/** + * 居民端-积分记录 + * + * @author wgf + * @since v1.0.0 2021-09-23 + */ +@Data +public class PointsLogListResultDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * id + */ + private String id; + + /** + * 积分操作类型 + */ + private String operationType; + + /** + * 操作描述 + */ + private String operationDesc; + + /** + * 积分 + */ + private String points; + + /** + * 操作时间 + */ + private String operationTime; + + + + + +} diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/AppAcitveController.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/AppAcitveController.java index e3ba378e8..6ee75751e 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/AppAcitveController.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/controller/AppAcitveController.java @@ -29,9 +29,11 @@ import com.elink.esua.epdc.dto.AcitveProductExchangeDTO; import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListJMFormDTO; +import com.elink.esua.epdc.dto.form.PointsLogListFormDTO; import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListJMResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; +import com.elink.esua.epdc.dto.result.PointsLogListResultDTO; import com.elink.esua.epdc.excel.AcitveProductExchangeExcel; import com.elink.esua.epdc.service.AcitveProductExchangeService; import com.elink.esua.epdc.service.AppAcitveService; @@ -96,5 +98,18 @@ public class AppAcitveController { return result; } + /** + * 居民端-积分记录 + * @param formDto + * @return + */ + @GetMapping("getPointsLogList") + public Result> getPointsLogList(@RequestBody PointsLogListFormDTO formDto){ + //效验数据 + ValidatorUtils.validateEntity(formDto); + Result> result = appAcitveService.getPointsLogList(formDto); + return result; + } + } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/AppAcitveDao.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/AppAcitveDao.java index 5b9ea0f0d..eae33df36 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/AppAcitveDao.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/dao/AppAcitveDao.java @@ -22,8 +22,10 @@ import com.elink.esua.epdc.dto.AcitveProductExchangeDTO; import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListJMFormDTO; +import com.elink.esua.epdc.dto.form.PointsLogListFormDTO; import com.elink.esua.epdc.dto.result.ExchangedListJMResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; +import com.elink.esua.epdc.dto.result.PointsLogListResultDTO; import com.elink.esua.epdc.entity.AcitveProductExchangeEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -53,4 +55,6 @@ public interface AppAcitveDao { List getExchangedJMList(ExchangedListJMFormDTO formDto); + List getPointsLogList(PointsLogListFormDTO formDto); + } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/AppAcitveService.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/AppAcitveService.java index d615e45a3..f0eb030ec 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/AppAcitveService.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/AppAcitveService.java @@ -24,9 +24,11 @@ import com.elink.esua.epdc.dto.AcitveProductExchangeDTO; import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListJMFormDTO; +import com.elink.esua.epdc.dto.form.PointsLogListFormDTO; import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListJMResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; +import com.elink.esua.epdc.dto.result.PointsLogListResultDTO; import com.elink.esua.epdc.entity.AcitveProductExchangeEntity; import java.util.List; @@ -45,4 +47,6 @@ public interface AppAcitveService { Result exchangedCheck(ExchangedCheckFormDTO formDto); Result> getExchangedJMList(ExchangedListJMFormDTO formDto); + + Result> getPointsLogList(PointsLogListFormDTO formDto); } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/AppAcitveServiceImpl.java b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/AppAcitveServiceImpl.java index f72795092..d23da9f03 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/AppAcitveServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/java/com/elink/esua/epdc/service/impl/AppAcitveServiceImpl.java @@ -32,9 +32,11 @@ import com.elink.esua.epdc.dto.AcitveProductExchangeDTO; import com.elink.esua.epdc.dto.form.ExchangedCheckFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListFormDTO; import com.elink.esua.epdc.dto.form.ExchangedListJMFormDTO; +import com.elink.esua.epdc.dto.form.PointsLogListFormDTO; import com.elink.esua.epdc.dto.result.ExchangedCheckResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListJMResultDTO; import com.elink.esua.epdc.dto.result.ExchangedListResultDTO; +import com.elink.esua.epdc.dto.result.PointsLogListResultDTO; import com.elink.esua.epdc.entity.AcitveProductExchangeEntity; import com.elink.esua.epdc.redis.AcitveProductExchangeRedis; import com.elink.esua.epdc.service.AcitveProductExchangeService; @@ -129,4 +131,15 @@ public class AppAcitveServiceImpl implements AppAcitveService { return new Result>().ok(list); } + + @Override + public Result> getPointsLogList(PointsLogListFormDTO formDto) { + + int pageIndex = (formDto.getPageIndex() - NumConstant.ONE) * formDto.getPageSize(); + formDto.setPageIndex(pageIndex); + + List list = appAcitveDao.getPointsLogList(formDto); + return new Result>().ok(list); + } + } diff --git a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/AppAcitveDao.xml b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/AppAcitveDao.xml index 1e177129f..e7fc7d6cf 100644 --- a/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/AppAcitveDao.xml +++ b/esua-epdc/epdc-module/epdc-points/epdc-points-server/src/main/resources/mapper/AppAcitveDao.xml @@ -100,5 +100,22 @@ LIMIT #{pageIndex},#{pageSize} + +