Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 5 years ago
parent
commit
75b13f1d8f
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

@ -147,7 +147,7 @@ public class TopicServiceImpl implements TopicService {
List<ScreenDifficultyImgDataEntity> imgs = topicDao.selectTopicImgs(list);
if(CollectionUtils.isEmpty(imgs)) return Collections.EMPTY_MAP;
//key -> topicId | value -> projectId
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId));
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId,(o,n)->n));
//key -> topicId
Map<String,List<ScreenDifficultyImgDataEntity>> result
= imgs.stream().collect(Collectors.groupingBy(ScreenDifficultyImgDataEntity :: getEventId));
@ -178,7 +178,7 @@ public class TopicServiceImpl implements TopicService {
if(CollectionUtils.isEmpty(contents)) return Collections.EMPTY_MAP;
Map<String,String> topicContentMap = contents.stream().collect(Collectors.toMap(TopicContentResultDTO :: getTopicId,TopicContentResultDTO::getContent));
//key -> topicId | value -> projectId
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId));
Map<String,String> projectTopicMap = list.stream().collect(Collectors.toMap(ProjectSourceMapFormDTO :: getSourceId,ProjectSourceMapFormDTO :: getProjectId,(o,n)->n));
Map<String,String> result = new HashMap<>();
projectTopicMap.forEach((topic,project) -> {
result.put(project,topicContentMap.get(topic));

Loading…
Cancel
Save