|
@ -509,9 +509,7 @@ public class IssueServiceImpl implements IssueService { |
|
|
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO(); |
|
|
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO(); |
|
|
form.setTopicIdList(topicIds); |
|
|
form.setTopicIdList(topicIds); |
|
|
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form); |
|
|
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form); |
|
|
if (!topicDetailsResult.success()) { |
|
|
if (topicDetailsResult.success() && !CollectionUtils.isEmpty(topicDetailsResult.getData())) { |
|
|
logger.error("调用resi-group批量查询详情失败"); |
|
|
|
|
|
} else { |
|
|
|
|
|
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData(); |
|
|
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData(); |
|
|
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails); |
|
|
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails); |
|
|
issueList.forEach(vi -> { |
|
|
issueList.forEach(vi -> { |
|
@ -521,8 +519,35 @@ public class IssueServiceImpl implements IssueService { |
|
|
vi.setTopicContent(rr == null ? "" :rr.getTopicContent()); |
|
|
vi.setTopicContent(rr == null ? "" :rr.getTopicContent()); |
|
|
vi.setLongitude(rr == null ? "" : rr.getLongitude()); |
|
|
vi.setLongitude(rr == null ? "" : rr.getLongitude()); |
|
|
vi.setLatitude(rr == null ? "" : rr.getLatitude()); |
|
|
vi.setLatitude(rr == null ? "" : rr.getLatitude()); |
|
|
|
|
|
// 赋值话题详情
|
|
|
|
|
|
if(null!=rr){ |
|
|
|
|
|
TopicInfoComDTO topicInfoDTO=new TopicInfoComDTO(); |
|
|
|
|
|
topicInfoDTO.setTopicId(rr.getTopicId()); |
|
|
|
|
|
topicInfoDTO.setTopicContent(rr.getTopicContent()); |
|
|
|
|
|
topicInfoDTO.setTopicImgs(rr.getTopicImgs()); |
|
|
|
|
|
topicInfoDTO.setTopicVoices(rr.getTopicVoices()); |
|
|
|
|
|
topicInfoDTO.setPublishedUser(rr.getReleaseUserName()); |
|
|
|
|
|
topicInfoDTO.setReleaseTime(rr.getReleaseTime()); |
|
|
|
|
|
vi.setTopicInfo(topicInfoDTO); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
// 来源于事件的
|
|
|
|
|
|
List<String> icEventIds = issueList.stream().filter(t -> t.getSourceType().equals("ic_event")).map(i -> i.getSourceId()).collect(Collectors.toList()); |
|
|
|
|
|
if (!CollectionUtils.isEmpty(icEventIds)) { |
|
|
|
|
|
Result<List<IcEventDTO>> eventInfoRes = govProjectOpenFeignClient.batchSelectById(icEventIds); |
|
|
|
|
|
if (eventInfoRes.success() && !CollectionUtils.isEmpty(eventInfoRes.getData())) { |
|
|
|
|
|
Map<String, IcEventDTO> eventMap = eventInfoRes.getData().stream().collect(Collectors.toMap(IcEventDTO::getId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
issueList.forEach(vi -> { |
|
|
|
|
|
IcEventDTO event = eventMap.get(vi.getSourceId()); |
|
|
|
|
|
if (null != event) { |
|
|
|
|
|
IcEventComDTO eventComDTO = ConvertUtils.sourceToTarget(event, IcEventComDTO.class); |
|
|
|
|
|
eventComDTO.setIcEventId(event.getId()); |
|
|
|
|
|
vi.setIcEventInfo(eventComDTO); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return issueList; |
|
|
return issueList; |
|
|