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 index ef6ed42a4f..982c254def 100644 --- 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 @@ -85,7 +85,12 @@ public class GetPastTopicListV2ResultDTO implements Serializable { /** * 是否变更,yes,no */ - private String isChange = "no"; + private Boolean isChanged = false; + + /** + * 通知或活动未读人员数 + */ + private Integer unReadCount; @JsonIgnore private String userId; diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java index 7682cc71a9..129c7a462d 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java +++ b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/topic/result/LatestTenResultDTO.java @@ -91,9 +91,9 @@ public class LatestTenResultDTO implements Serializable { private Boolean isExpirat; /** - * 是否变更,yes,no + * 是否变更(true:是 false:否) */ - private String isChange; + private Boolean isChanged; public LatestTenResultDTO() { this.id = ""; @@ -111,6 +111,6 @@ public class LatestTenResultDTO implements Serializable { this.readOrUnRead = ""; this.unReadCount = NumConstant.ZERO; this.isExpirat = false; - this.isChange = "no"; + this.isChanged = false; } } 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 d892b97855..b7e99d4bf9 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 @@ -505,10 +505,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + } else { + latestTenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } } @@ -578,10 +582,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + }else { + pastTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } @@ -1046,10 +1054,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl top.setBadgeList(Collections.EMPTY_LIST)); + } else { + hiddenTopics.forEach(top -> top.setBadgeList(Collections.EMPTY_LIST)); + } } } @@ -1904,6 +1916,10 @@ public class ResiTopicServiceImpl extends BaseServiceImpl baseDao.selectParticipatedTopics(param.getCustomerId(),param.getUserId())); List result = page.getList(); - if(CollectionUtils.isEmpty(result)) return Collections.EMPTY_LIST; + if(CollectionUtils.isEmpty(result)) { + return Collections.EMPTY_LIST; + } Result> gridR = govOrgOpenFeignClient.selectOrgInfo( new OrgInfoFormDTO(OrgInfoConstant.GRID,result.stream().map(ParticipatedTopicUnitResultDTO :: getTopicReleaseGridName).distinct().collect(Collectors.toList()))); if(gridR.success() && !CollectionUtils.isEmpty(gridR.getData())){ @@ -2260,7 +2278,9 @@ public class ResiTopicServiceImpl extends BaseServiceImpl applications = reply.getData(); return StringUtils.equals(ModuleConstant.TOPIC_SHIFTED_TO_ISSUE_STATUS_UNDER_AUDITING,applications.get(NumConstant.ZERO).getApplyStatus()) ? true : false; - }else return false; + }else { + return false; + } } log.error("Method [checkTopicIfUnderAuditing] of service gov-issue called failed,topicId is [%s]",topicId); throw new RenException(reply.getInternalMsg()); @@ -2563,6 +2583,8 @@ public class ResiTopicServiceImpl extends BaseServiceImpl userInfos = this.disPoseUserInfo(resiGroup.getGroupType(), userIds); // 根据用户ID和【活动、通知ID】查询阅读状态 List readStatus = resiGroupDao.selectReadFlagByUserAndId(ids, userIds); + // 查询小组下的 通知或活动 未读人数 + List userUnReadCount = resiGroupDao.selectUserUnReadById(formDTO.getGroupId(), ids); // 查询用户徽章信息 Result> badgeResult = epmetUserOpenFeignClient.userBadges(new UserBadgesFormDTO(formDTO.getCustomerId(),userIds)); if (!badgeResult.success()){ @@ -2604,6 +2626,14 @@ public class ResiTopicServiceImpl extends BaseServiceImpl { + if (i.getId().equals(u.getId())){ + i.setUnReadCount(u.getUnRead()); + } + }); + } }); return infos; } diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 7144013dd6..0c369b4681 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -567,7 +567,7 @@ 'topic' AS contentType, IFNULL(ta.ATTACHMENT_URL,'') AS firstPhoto, false AS isExpirat, - 'no' AS isChange + false AS isChanged FROM resi_topic t LEFT JOIN resi_topic_attachment ta ON ta.TOPIC_ID = t.ID AND ta.ATTACHMENT_TYPE = 'image' AND ta.DEL_FLAG = '0' AND ta.SORT = 0 WHERE t.DEL_FLAG = '0' @@ -586,7 +586,7 @@ 'act' AS contentType, IFNULL(ac2.CONTENT,'') AS firstPhoto, false AS isExpirat, - 'no' AS isChange + false AS isChanged FROM group_act_info ai LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1 WHERE ai.DEL_FLAG = '0' @@ -604,7 +604,7 @@ 'notice' AS contentType, IFNULL(na.ATTACHMENT_URL,'') AS firstPhoto, (CASE WHEN UNIX_TIMESTAMP(n.EXPIRATION_TIME) UNIX_TIMESTAMP(NOW()) THEN TRUE ELSE FALSE END) AS isExpirat, - n.IS_CHANGE + (case when n.is_change = 'yes' then true else false end) AS isChanged FROM notice n LEFT JOIN notice_attachment na ON na.NOTICE_ID = n.ID AND na.DEL_FLAG = '0' AND na.ATTACHMENT_TYPE = 'image' AND na.SORT = 0 WHERE n.DEL_FLAG = '0' @@ -786,7 +786,7 @@