|
@@ -214,7 +214,7 @@ public class RecallService implements ApplicationContextAware {
|
|
|
content.setCategory(Collections.singletonList(category.getCategory()));
|
|
|
continue;
|
|
|
}
|
|
|
- log.error("setContentCategory NullError channelContentId:{}", content.getCrawlerChannelContentId());
|
|
|
+// log.error("setContentCategory NullError channelContentId:{}", content.getCrawlerChannelContentId());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -265,7 +265,7 @@ public class RecallService implements ApplicationContextAware {
|
|
|
List<Article> hisArticleList = new ArrayList<>();
|
|
|
List<List<String>> titleMd5Partition = Lists.partition(new ArrayList<>(titleMd5List), 1000);
|
|
|
for (List<String> titleMd5s : titleMd5Partition) {
|
|
|
- hisArticleList.addAll(articleRepository.getByTitleMd5InAndTypeEqualsAndStatusEquals(titleMd5s, type, 1));
|
|
|
+ hisArticleList.addAll(crawlerBaseMapper.getByTitleMd5InAndTypeEqualsAndStatusEquals(titleMd5s, type, 1));
|
|
|
}
|
|
|
Map<String, Map<Integer, List<Article>>> map = hisArticleList.stream()
|
|
|
.collect(Collectors.groupingBy(Article::getTitle, Collectors.groupingBy(Article::getItemIndex)));
|
|
@@ -273,19 +273,19 @@ public class RecallService implements ApplicationContextAware {
|
|
|
List<ArticleDetailInfo> articleDetailInfoList = new ArrayList<>();
|
|
|
List<List<String>> snPartition = Lists.partition(new ArrayList<>(snList), 1000);
|
|
|
for (List<String> sns : snPartition) {
|
|
|
- articleDetailInfoList.addAll(articleDetailInfoRepository.getAllByWxSnIn(sns));
|
|
|
+ articleDetailInfoList.addAll(crawlerBaseMapper.getAllByWxSnIn(sns));
|
|
|
}
|
|
|
Map<String, List<ArticleDetailInfo>> articleDetailInfoMap = articleDetailInfoList.stream()
|
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
|
// 获取历史已发布文章所属头条内容
|
|
|
Set<String> ghIds = hisArticleList.stream().map(Article::getGhId).collect(Collectors.toSet());
|
|
|
Set<String> appMsgIds = hisArticleList.stream().map(Article::getAppMsgId).collect(Collectors.toSet());
|
|
|
- List<Article> firstIndexHisArticleList = articleRepository.getByGhIdInAndAppMsgIdInAndItemIndexAndTypeEqualsAndStatusEquals(
|
|
|
+ List<Article> firstIndexHisArticleList = crawlerBaseMapper.getByGhIdInAndAppMsgIdInAndItemIndexAndTypeEqualsAndStatusEquals(
|
|
|
ghIds, appMsgIds, 1, type, 1);
|
|
|
Map<String, Map<String, Article>> firstIndexHisArticleMap = firstIndexHisArticleList.stream()
|
|
|
.collect(Collectors.groupingBy(Article::getGhId, Collectors.toMap(Article::getAppMsgId, o -> o)));
|
|
|
// 获取发布账号 位置历史均值
|
|
|
- List<AccountAvgInfo> accountAvgInfoList = accountAvgInfoRepository.getAllByGhIdIn(ghIds);
|
|
|
+ List<AccountAvgInfo> accountAvgInfoList = crawlerBaseMapper.getAllByGhIdIn(ghIds);
|
|
|
Map<String, Map<String, Map<String, AccountAvgInfo>>> accountAvgInfoIndexMap = accountAvgInfoList.stream()
|
|
|
.filter(o -> Objects.nonNull(o.getReadAvg()) && o.getReadAvg() > 0 && o.getFans() > 1000)
|
|
|
.collect(Collectors.groupingBy(AccountAvgInfo::getGhId, Collectors.groupingBy(AccountAvgInfo::getUpdateTime,
|