|
@@ -54,8 +54,8 @@ public class DefaultRecallStrategy implements RecallStrategy {
|
|
|
if (CollectionUtils.isEmpty(categoryList)) {
|
|
|
return;
|
|
|
}
|
|
|
- Map<String, String> categoryMap = categoryList.stream().collect(Collectors.toMap(ContentCategory::getChannelContentId,
|
|
|
- ContentCategory::getCategory));
|
|
|
+ Map<String, List<String>> categoryMap = categoryList.stream().collect(Collectors.groupingBy(ContentCategory::getContentChannelId,
|
|
|
+ Collectors.mapping(ContentCategory::getCategory, Collectors.toList())));
|
|
|
for (Content content : contentList) {
|
|
|
content.setCategory(categoryMap.get(content.getCrawlerChannelContentId()));
|
|
|
}
|