|
|
@ -659,19 +659,12 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
} |
|
|
|
List<UserResiInfoResultDTO> userInfoList = listResult.getData(); |
|
|
|
|
|
|
|
//3:调用resi-group服务,批量查询话题内容
|
|
|
|
List<String> topicIdList = entityList.stream().map(IssueEntity::getSourceId).collect(Collectors.toList()); |
|
|
|
Result<List<ResiTopicDTO>> resultTopicList = resiGroupFeignClient.getTopicList(topicIdList); |
|
|
|
if (!resultTopicList.success() || null == resultTopicList.getData()) { |
|
|
|
throw new RenException(IssueConstant.SELECT_RESI_GROUP_EXCEPTION); |
|
|
|
} |
|
|
|
List<ResiTopicDTO> topicList = resultTopicList.getData(); |
|
|
|
|
|
|
|
//4:遍历组装对象
|
|
|
|
//3:遍历组装对象
|
|
|
|
entityList.forEach(issue -> { |
|
|
|
LatestIssueListResultDTO resultDTO = new LatestIssueListResultDTO(); |
|
|
|
resultDTO.setIssueId(issue.getId()); |
|
|
|
resultDTO.setIssueTitle(issue.getIssueTitle()); |
|
|
|
resultDTO.setSuggestion(issue.getSuggestion()); |
|
|
|
resultDTO.setCreateIssueTime(issue.getCreatedTime().getTime()/1000); |
|
|
|
userInfoList.forEach(user -> { |
|
|
|
if (issue.getCreatedBy().equals(user.getUserId())) { |
|
|
@ -680,12 +673,6 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
resultDTO.setIssuePublisherName(user.getShowName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
topicList.forEach(topic -> { |
|
|
|
if (issue.getSourceId().equals(topic.getId())) { |
|
|
|
//话题内容
|
|
|
|
resultDTO.setTopicContent(topic.getTopicContent()); |
|
|
|
} |
|
|
|
}); |
|
|
|
returnList.add(resultDTO); |
|
|
|
}); |
|
|
|
|
|
|
|