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 new file mode 100644 index 0000000000..887a457b4e --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/CanceledActResultDTO.java @@ -0,0 +1,55 @@ +package com.epmet.dto.result.work; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/23 23:09 + */ +@Data +public class CanceledActResultDTO implements Serializable { + private static final long serialVersionUID = 7026227776577088524L; + /** + *活动id + */ + private String actId; + + /** + *活动标题 + */ + private String title; + + /** + * 活动封面 + */ + private String coverPic; + + /** + * 活动预计开始时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actStartTime; + + /** + * 活动预计结束时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actEndTime; + + /** + * 取消活动的时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date cancelTime; + + /** + * 活动取消的原因 + */ + private String cancelReason; +} 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 new file mode 100644 index 0000000000..25f9d7e46b --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/work/FinishedActResultDTO.java @@ -0,0 +1,56 @@ +package com.epmet.dto.result.work; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 描述一下 + * + * @author yinzuomei@elink-cn.com + * @date 2020/7/23 23:19 + */ +@Data +public class FinishedActResultDTO implements Serializable { + private static final long serialVersionUID = -8967999331248723146L; + + /** + *活动id + */ + private String actId; + + /** + *活动标题 + */ + private String title; + + /** + * 活动封面 + */ + private String coverPic; + + /** + * 活动预计开始时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actStartTime; + + /** + * 活动预计结束时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actEndTime; + /** + * 活动实际开始时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actualStartTime; + + /** + * 活动实际结束时间yyyy-MM-dd HH:mm + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + private Date actualEndTime; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java index e7ce6b50a8..2e14ec9aac 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/WorkActController.java @@ -3,11 +3,14 @@ package com.epmet.controller; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.work.ActListCommonFormDTO; +import com.epmet.dto.result.work.CanceledActResultDTO; +import com.epmet.dto.result.work.FinishedActResultDTO; import com.epmet.dto.result.work.InProgressActResultDTO; import com.epmet.dto.result.work.SponsorResultDTO; import com.epmet.service.WorkActService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -45,8 +48,34 @@ public class WorkActController { * @Date 2020/7/23 21:24 **/ @PostMapping("inprogresslist") - public Result> queryInProgressList(ActListCommonFormDTO formDTO){ + public Result> queryInProgressList(@RequestBody ActListCommonFormDTO formDTO){ ValidatorUtils.validateEntity(formDTO,ActListCommonFormDTO.AddUserInternalGroup.class); return new Result>().ok(workActService.queryInProgressList(formDTO)); } + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param formDTO + * @author yinzuomei + * @description 已取消-活动列表 + * @Date 2020/7/23 23:11 + **/ + @PostMapping("canceledlist") + public Result> queryCanceledlist(@RequestBody ActListCommonFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,ActListCommonFormDTO.AddUserInternalGroup.class); + return new Result>().ok(workActService.queryCanceledList(formDTO)); + } + + /** + * @return com.epmet.commons.tools.utils.Result> + * @param formDTO + * @author yinzuomei + * @description 已结束-活动列表 + * @Date 2020/7/23 23:21 + **/ + @PostMapping("finishedlist") + public Result> queryFinishedList(@RequestBody ActListCommonFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,ActListCommonFormDTO.AddUserInternalGroup.class); + return new Result>().ok(workActService.queryFinishedList(formDTO)); + } } 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 6166d5ffdd..700c114b6d 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 @@ -25,6 +25,8 @@ import com.epmet.dto.form.resi.ResiLatestActFormDTO; import com.epmet.dto.form.resi.ResiMyActFormDTO; import com.epmet.dto.result.resi.*; import com.epmet.dto.result.work.ActSignUpStatResultDTO; +import com.epmet.dto.result.work.CanceledActResultDTO; +import com.epmet.dto.result.work.FinishedActResultDTO; import com.epmet.dto.result.work.InProgressActResultDTO; import com.epmet.entity.ActInfoEntity; import org.apache.ibatis.annotations.Mapper; @@ -235,4 +237,22 @@ public interface ActInfoDao extends BaseDao { * @Date 2020/7/23 21:58 **/ List selectInprogress(String customerId); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 已取消-活动列表 + * @Date 2020/7/23 23:13 + **/ + List selectCanceledList(String customerId); + + /** + * @return java.util.List + * @param customerId + * @author yinzuomei + * @description 已结束-活动列表 + * @Date 2020/7/23 23:21 + **/ + List selectFinishedList(String customerId); } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java index 4a623371c8..3945c19213 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/WorkActService.java @@ -1,6 +1,8 @@ package com.epmet.service; import com.epmet.dto.form.work.ActListCommonFormDTO; +import com.epmet.dto.result.work.CanceledActResultDTO; +import com.epmet.dto.result.work.FinishedActResultDTO; import com.epmet.dto.result.work.InProgressActResultDTO; import com.epmet.dto.result.work.SponsorResultDTO; @@ -30,4 +32,22 @@ public interface WorkActService { * @Date 2020/7/23 21:24 **/ List queryInProgressList(ActListCommonFormDTO formDTO); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 已取消-活动列表 + * @Date 2020/7/23 23:11 + **/ + List queryCanceledList(ActListCommonFormDTO formDTO); + + /** + * @return java.util.List + * @param formDTO + * @author yinzuomei + * @description 已结束-活动列表 + * @Date 2020/7/23 23:21 + **/ + List queryFinishedList(ActListCommonFormDTO formDTO); } 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 161d838d57..cdeb80c3d3 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 @@ -6,9 +6,7 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.dao.ActInfoDao; import com.epmet.dto.form.work.ActListCommonFormDTO; import com.epmet.dto.result.ActSponsorResultDTO; -import com.epmet.dto.result.work.Grid; -import com.epmet.dto.result.work.InProgressActResultDTO; -import com.epmet.dto.result.work.SponsorResultDTO; +import com.epmet.dto.result.work.*; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.WorkActService; import org.apache.commons.lang3.StringUtils; @@ -106,6 +104,30 @@ public class WorkActServiceImpl implements WorkActService { return list; } + /** + * @param formDTO + * @return java.util.List + * @author yinzuomei + * @description 已取消-活动列表 + * @Date 2020/7/23 23:11 + **/ + @Override + public List queryCanceledList(ActListCommonFormDTO formDTO) { + return actInfoDao.selectCanceledList(formDTO.getCustomerId()); + } + + /** + * @param formDTO + * @return java.util.List + * @author yinzuomei + * @description 已结束-活动列表 + * @Date 2020/7/23 23:21 + **/ + @Override + public List queryFinishedList(ActListCommonFormDTO formDTO) { + return actInfoDao.selectFinishedList(formDTO.getCustomerId()); + } + public static void main(String[] args) { SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 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 e16f3b8369..2ddf0c9398 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 @@ -488,4 +488,44 @@ and ai.CUSTOMER_ID=#{customerId} order by ai.CREATED_TIME desc + + + + + +