wangyunpeng 1 неделя назад
Родитель
Сommit
7c53bf1ce3

+ 4 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleCategoryService.java

@@ -298,7 +298,8 @@ public class ArticleCategoryService {
         for (List<String> partition : Lists.partition(producePlanExeIds, 1000)) {
             contentList.addAll(aigcBaseMapper.getProduceContentByPlanExeIds(partition));
         }
-        Map<String, ProduceContentDTO> map = contentList.stream().collect(Collectors.toMap(ProduceContentDTO::getContentId, Function.identity()));
+        Map<String, ProduceContentDTO> map = contentList.stream()
+                .collect(Collectors.toMap(ProduceContentDTO::getContentId, Function.identity(), (a, b) -> a));
 
         List<String> channelContentIds = list.stream().map(ProduceContentCrawlerVO::getChannelContentId).collect(Collectors.toList());
         List<CrawlerContent> crawlerContentList = new ArrayList<>();
@@ -306,7 +307,8 @@ public class ArticleCategoryService {
         for (List<String> partition : Lists.partition(channelContentIds, 1000)) {
             crawlerContentList.addAll(aigcBaseMapper.getCrawlerContentByChannelContentIdIn(partition));
         }
-        Map<String, CrawlerContent> crawlerContentMap = crawlerContentList.stream().collect(Collectors.toMap(CrawlerContent::getChannelContentId, Function.identity()));
+        Map<String, CrawlerContent> crawlerContentMap = crawlerContentList.stream()
+                .collect(Collectors.toMap(CrawlerContent::getChannelContentId, Function.identity()));
         long now = System.currentTimeMillis();
         List<ArticleCategory> saveList = new ArrayList<>();
         for (ProduceContentCrawlerVO vo : list) {