diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java index 25a226886a..7a23edc9cd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java @@ -38,6 +38,7 @@ import com.epmet.commons.tools.scan.result.VoiceResultDTO; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.*; import com.epmet.dto.result.AllGridsByUserIdResultDTO; +import com.epmet.dto.result.UserInfoResultDTO; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.modules.feign.EpmetUserFeignClient; import com.epmet.modules.group.dao.GroupMessageDao; @@ -148,6 +149,8 @@ public class TopicDraftServiceImpl extends BaseServiceImpl page(Map params) { @@ -630,13 +633,27 @@ public class TopicDraftServiceImpl extends BaseServiceImpl { - ResiGroupMemberInfoRedisDTO memberRedis = - resiGroupMemberRedis.get(formDTO.getGroupId(),item.getUserName()); - if(null != memberRedis && StringUtils.isNotBlank(memberRedis.getUserId())){ - item.setUserName(StringUtils.isBlank(memberRedis.getUserShowName()) ? "" : memberRedis.getUserShowName()); - } - }); + //查询小组信息 + ResiGroupEntity group = resiGroupDao.selectById(formDTO.getGroupId()); + if ("branch".equals(group.getGroupType())) { + List userIds = result.stream().map(m -> m.getUserName()).distinct().collect(Collectors.toList()); + List userInfos = resiTopicServiceImpl.disPoseUserInfo(group.getGroupType(), userIds); + result.forEach(item -> { + userInfos.forEach(u->{ + if(item.getUserName().equals(u.getUserId())){ + item.setUserName(u.getReleaseUserName()); + } + }); + }); + } else { + result.forEach(item -> { + ResiGroupMemberInfoRedisDTO memberRedis = + resiGroupMemberRedis.get(formDTO.getGroupId(),item.getUserName()); + if(null != memberRedis && StringUtils.isNotBlank(memberRedis.getUserId())){ + item.setUserName(StringUtils.isBlank(memberRedis.getUserShowName()) ? "" : memberRedis.getUserShowName()); + } + }); + } return result; }