diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java index bc89178a5c..f4ad2ca4f1 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/ActListCommonFormDTO.java @@ -2,11 +2,13 @@ package com.epmet.dto.form.work; import lombok.Data; +import javax.validation.constraints.Min; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.io.Serializable; /** - * 描述一下 + * 工作端 进行中-活动列表、已取消-活动列表、已结束-活动列表 统一入参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/23 21:21 @@ -20,4 +22,15 @@ public class ActListCommonFormDTO implements Serializable { */ @NotBlank(message = "客户id不能为空", groups = {AddUserInternalGroup.class }) private String customerId; + + /** + * 页码 + */ + @Min(1) + private Integer pageNo; + + /** + * 每页显示条数 + */ + private Integer pageSize = 20; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java index 1ae524df14..a31924f994 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/CancelActFormDTO.java @@ -7,7 +7,7 @@ import javax.validation.constraints.NotBlank; import java.io.Serializable; /** - * 描述一下 + * 取消活动入参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/26 17:23 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java index 4c6e2fe66b..5143bc30ef 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/work/TestGrantFormDTO.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; import java.io.Serializable; /** - * 描述一下 + * 测试发放积分入参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/30 12:15 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java index 4c8b013287..17e21fc678 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java @@ -7,7 +7,7 @@ import java.io.Serializable; import java.util.Date; /** - * 描述一下 + * 工作端:已取消-活动列表返参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/23 23:09 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java index 6a23d0498b..a908287e24 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java @@ -7,7 +7,7 @@ import java.io.Serializable; import java.util.Date; /** - * 描述一下 + * 工作端:已结束-活动列表 返参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/23 23:19 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java index 581eac9d9a..870248e90e 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/Grid.java @@ -25,7 +25,7 @@ import java.io.Serializable; /** * 添加组织-接口返参 * - * @author sun + * @author yinzuomei */ @Data public class Grid implements Serializable { diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java index c7c73f6a96..7f0d214f70 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/InProgressActResultDTO.java @@ -8,7 +8,7 @@ import java.io.Serializable; import java.util.Date; /** - * 描述一下 + * 工作端:进行中-活动列表返参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/23 21:23 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/PublishActInitResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/PublishActInitResultDTO.java index 08c3ff1d97..f71b67943a 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/PublishActInitResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/PublishActInitResultDTO.java @@ -5,7 +5,7 @@ import lombok.Data; import java.io.Serializable; /** - * 描述一下 + * 发布活动初始化接口返参 * * @author yinzuomei@elink-cn.com * @date 2020/7/20 17:49 diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java index ee7006381f..46746686ca 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/SponsorResultDTO.java @@ -6,7 +6,7 @@ import java.io.Serializable; import java.util.List; /** - * 描述一下 + * 活动主办方 返参DTO * * @author yinzuomei@elink-cn.com * @date 2020/7/23 20:23 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java index e27d70b442..002bd3a6b3 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/ActInfoDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.form.resi.ResiActBaseFormDTO; import com.epmet.dto.form.resi.ResiActDetailFormDTO; import com.epmet.dto.form.resi.ResiLatestActFormDTO; import com.epmet.dto.form.resi.ResiMyActFormDTO; +import com.epmet.dto.form.work.ActListCommonFormDTO; import com.epmet.dto.result.resi.*; import com.epmet.dto.result.work.*; import com.epmet.entity.ActInfoEntity; @@ -228,30 +229,30 @@ public interface ActInfoDao extends BaseDao { /** * @return java.util.List - * @param customerId + * @param actListCommonFormDTO * @author yinzuomei * @description 查询正在进行中的活动列表 * @Date 2020/7/23 21:58 **/ - List selectInprogress(String customerId); + List selectInprogress(ActListCommonFormDTO actListCommonFormDTO); /** * @return java.util.List - * @param customerId + * @param actListCommonFormDTO * @author yinzuomei * @description 已取消-活动列表 * @Date 2020/7/23 23:13 **/ - List selectCanceledList(String customerId); + List selectCanceledList(ActListCommonFormDTO actListCommonFormDTO); /** * @return java.util.List - * @param customerId + * @param actListCommonFormDTO * @author yinzuomei * @description 已结束-活动列表 * @Date 2020/7/23 23:21 **/ - List selectFinishedList(String customerId); + List selectFinishedList(ActListCommonFormDTO actListCommonFormDTO); /** * @return java.util.List diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java index a390e9c14e..a627207faa 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/WorkActServiceImpl.java @@ -532,7 +532,9 @@ public class WorkActServiceImpl implements WorkActService { **/ @Override public List queryInProgressList(ActListCommonFormDTO formDTO) { - List list = actInfoDao.selectInprogress(formDTO.getCustomerId()); + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + List list = actInfoDao.selectInprogress(formDTO); Date nowDate = new Date(); for (InProgressActResultDTO inProgressActResultDTO : list) { // 活动状态:报名中:signing_up;截止报名: end_sign_up; 已开始: in_progress; 已报满: enough @@ -596,7 +598,9 @@ public class WorkActServiceImpl implements WorkActService { **/ @Override public List queryCanceledList(ActListCommonFormDTO formDTO) { - return actInfoDao.selectCanceledList(formDTO.getCustomerId()); + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + return actInfoDao.selectCanceledList(formDTO); } /** @@ -608,7 +612,9 @@ public class WorkActServiceImpl implements WorkActService { **/ @Override public List queryFinishedList(ActListCommonFormDTO formDTO) { - return actInfoDao.selectFinishedList(formDTO.getCustomerId()); + int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); + formDTO.setPageNo(pageIndex); + return actInfoDao.selectFinishedList(formDTO); } /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml index 2c11d426dd..a5de7c102e 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/ActInfoDao.xml @@ -473,7 +473,7 @@ - SELECT ai.id AS actId, ai.TITLE AS title, @@ -502,10 +502,11 @@ AND ai.ACT_STATUS = 'published' and ai.CUSTOMER_ID=#{customerId} order by ai.CREATED_TIME desc + limit #{pageNo}, #{pageSize} - SELECT ai.id AS actId, ai.TITLE AS title, @@ -523,10 +524,11 @@ AND ai.CUSTOMER_ID = #{customerId} ORDER BY ai.CREATED_TIME DESC + limit #{pageNo}, #{pageSize} - SELECT ai.id AS actId, ai.TITLE AS title, @@ -544,6 +546,7 @@ AND ai.CUSTOMER_ID = #{customerId} ORDER BY ai.CREATED_TIME DESC + limit #{pageNo}, #{pageSize}