From fc6522dc447e763d4f788c834f6e3efa9dc0bdb9 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 21 Apr 2021 15:56:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=85=B3=E9=97=AD=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/act/form/CloseGroupActFormDTO.java | 27 +++++++++ .../controller/GroupActInfoController.java | 17 ++++++ .../act/service/ActSummaryService.java | 2 + .../act/service/GroupActInfoService.java | 8 +++ .../service/impl/ActSummaryServiceImpl.java | 5 ++ .../service/impl/GroupActInfoServiceImpl.java | 56 ++++++++++++++++--- 6 files changed, 106 insertions(+), 9 deletions(-) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java new file mode 100644 index 0000000000..17d417376c --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/form/CloseGroupActFormDTO.java @@ -0,0 +1,27 @@ +package com.epmet.resi.group.dto.act.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 017、关闭活动 + * + * @author yinzuomei@elink-cn.com + * @date 2021/4/21 15:18 + */ +@Data +public class CloseGroupActFormDTO implements Serializable { + + public interface AddUserInternalGroup { + } + @NotBlank(message = "groupActId不能为空", groups = ActSummaryDetailFormDTO.AddUserInternalGroup.class) + private String groupActId; + + /** + * 当前用户id + */ + @NotBlank(message = "tokenDto获取userId为空", groups = ActReadViewFormDTO.AddUserInternalGroup.class) + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java index e69121c2d2..d2231f005b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/controller/GroupActInfoController.java @@ -122,4 +122,21 @@ public class GroupActInfoController { ValidatorUtils.validateEntity(formDTO,ActDetailByLinkFormDTO.AddUserInternalGroup.class); return new Result().ok(groupActInfoService.queryActDetailByLink(formDTO)); } + + /** + * @return com.epmet.commons.tools.utils.Result + * @param tokenDto + * @param formDTO + * @author yinzuomei + * @description 017、关闭活动 + * @Date 2021/4/21 15:22 + **/ + @PostMapping("close") + public Result closeAct(@LoginUser TokenDto tokenDto,@RequestBody CloseGroupActFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,CloseGroupActFormDTO.AddUserInternalGroup.class); + groupActInfoService.closeAct(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java index 815ebad816..b56ba655e3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/ActSummaryService.java @@ -59,4 +59,6 @@ public interface ActSummaryService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActSummaryDetailResultDTO */ ActSummaryDetailResultDTO queryActSummaryDetail(ActSummaryDetailFormDTO formDTO); + + ActSummaryEntity queryUserSummary(String groupActId, String userId); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java index d108c976e5..b815bb7358 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/GroupActInfoService.java @@ -81,4 +81,12 @@ public interface GroupActInfoService extends BaseService { * @return com.epmet.resi.group.dto.act.result.ActDetailByLinkResultDTO */ ActDetailByLinkResultDTO queryActDetailByLink(ActDetailByLinkFormDTO formDTO); + + /** + * 017、关闭活动 + * + * @param formDTO + * @return + */ + void closeAct(CloseGroupActFormDTO formDTO); } \ No newline at end of file diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java index e5537fe340..e9d2aeba9b 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSummaryServiceImpl.java @@ -296,4 +296,9 @@ public class ActSummaryServiceImpl extends BaseServiceImpl Date: Wed, 21 Apr 2021 16:10:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2V2=20=E6=A1=86=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../topic/form/GetPastTopicListV2FormDTO.java | 36 +++++++++ .../result/GetPastTopicListV2ResultDTO.java | 77 +++++++++++++++++++ .../topic/controller/ResiTopicController.java | 14 ++++ .../topic/service/ResiTopicService.java | 9 +++ .../service/impl/ResiTopicServiceImpl.java | 12 +++ 5 files changed, 148 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java create mode 100644 epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java new file mode 100644 index 0000000000..ad41e9bf81 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/form/GetPastTopicListV2FormDTO.java @@ -0,0 +1,36 @@ +package com.epmet.resi.group.dto.topic.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午3:21 + * @DESC + */ +@Data +public class GetPastTopicListV2FormDTO implements Serializable { + + private static final long serialVersionUID = 3746688354140118007L; + + public interface GetPastTopicListV2Form{} + + /** + * null默认查询讨论中、已关闭,dicussing讨论中,closed关闭 + */ + private String status; + + @NotBlank(message = "小组ID不能为空",groups = GetPastTopicListV2Form.class) + private String groupId; + + @NotNull(message = "pageSize不能为空",groups = GetPastTopicListV2Form.class) + private Integer pageSize; + + @NotNull(message = "pageNo不能为空",groups = GetPastTopicListV2Form.class) + private Integer pageNo; + + private String userId; +} diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java new file mode 100644 index 0000000000..fcc28ddec8 --- /dev/null +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/GetPastTopicListV2ResultDTO.java @@ -0,0 +1,77 @@ +package com.epmet.resi.group.dto.topic.result; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author zxc + * @DateTime 2021/4/21 下午3:15 + * @DESC + */ +@Data +public class GetPastTopicListV2ResultDTO implements Serializable { + + private static final long serialVersionUID = -8352977778269083843L; + + /** + * 话题、通知、活动Id + */ + private String id; + + /** + * 发布者的全称(街道-姓氏先生/女士)【专项组显示真实名】 + */ + private String releaseUserName; + + /** + * 发布者的头像Url + */ + private String releaseUserHeadPhoto; + + /** + * 发布时间yyyy-MM-dd + */ + private String releaseTime; + + /** + * 内容 + */ + private String content; + + /** + * 话题状态(discussing进行中、closed已关闭) + */ + private String status; + + /** + * 是否本人 + */ + private Boolean releaseUserFlag; + + /** + * 议题id + */ + private String issueId; + + /** + * 是否被转为议题true,false + */ + private Boolean shiftIssueFlag; + + /** + * 数据类型(topic:话题 notice:通知 act:活动) + */ + private String contentType; + + /** + * 本人已读未读状态(read已读 unread未读) + */ + private String readOrUnRead; + + /** + * 徽章Url集合 + */ + private List badgeList; +} diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java index 4e824c18ef..a53708526d 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/controller/ResiTopicController.java @@ -455,4 +455,18 @@ public class ResiTopicController { formDTO.setUserId(tokenDto.getUserId()); return new Result().ok(topicService.getLatestV2(formDTO)); } + + /** + * @Description 小组历史数据查询V2 + * @Param formDTO + * @Param tokenDto + * @author zxc + * @date 2021/4/21 下午4:08 + */ + @PostMapping("getpasttopiclistv2") + public Result> getPastTopicListV2(@RequestBody GetPastTopicListV2FormDTO formDTO,@LoginUser TokenDto tokenDto){ + ValidatorUtils.validateEntity(formDTO, GetPastTopicListV2FormDTO.GetPastTopicListV2Form.class); + formDTO.setUserId(tokenDto.getUserId()); + return new Result>().ok(topicService.getPastTopicListV2(formDTO)); + } } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java index 48ba5166e5..ed79f489ac 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/ResiTopicService.java @@ -361,4 +361,13 @@ public interface ResiTopicService extends BaseService { * @date 2021/4/20 下午2:34 */ GetLatestV2ResultDTO getLatestV2(GetLatestV2FormDTO formDTO); + + /** + * @Description 小组历史数据查询V2 + * @Param formDTO + * @Param tokenDto + * @author zxc + * @date 2021/4/21 下午4:08 + */ + List getPastTopicListV2(GetPastTopicListV2FormDTO formDTO); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java index 51a5225d52..302ee743b3 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/ResiTopicServiceImpl.java @@ -2264,6 +2264,18 @@ public class ResiTopicServiceImpl extends BaseServiceImpl getPastTopicListV2(GetPastTopicListV2FormDTO formDTO) { + return null; + } + /** * @Description 查询用户信息【头像,名字】 * @Param groupType