|
@@ -268,12 +268,14 @@ public class RecallService implements ApplicationContextAware {
|
|
|
|
|
|
public void setTitleAvgViewCount(List<Content> contentList, String ghId, String type) {
|
|
|
long start = System.currentTimeMillis();
|
|
|
+
|
|
|
+ Set<String> titleMd5List = contentList.stream().map(o -> Md5Util.encoderByMd5(o.getTitle())).collect(Collectors.toSet());
|
|
|
+ // todo 根据titleMd5查询数据库获取数据
|
|
|
+ // todo titleMd5 进行过滤 排除缓存中数据 重新走下方查询
|
|
|
// 获取账号相关性
|
|
|
List<AccountCorrelation> accountCorrelationList = accountCorrelationRepository.findByGhIdAndStatus(ghId, 1);
|
|
|
Map<String, Double> accountCorrelationMap = accountCorrelationList.stream().collect(
|
|
|
Collectors.toMap(AccountCorrelation::getRelGhId, AccountCorrelation::getCorrelation));
|
|
|
-
|
|
|
- Set<String> titleMd5List = contentList.stream().map(o -> Md5Util.encoderByMd5(o.getTitle())).collect(Collectors.toSet());
|
|
|
// Set<String> titleList = contentList.stream().map(Content::getTitle).collect(Collectors.toSet());
|
|
|
// Set<String> crawlerTitleList = contentList.stream().map(Content::getCrawlerTitle).collect(Collectors.toSet());
|
|
|
// titleList.addAll(crawlerTitleList);
|
|
@@ -410,6 +412,7 @@ public class RecallService implements ApplicationContextAware {
|
|
|
}
|
|
|
// 设置头条阅读均值
|
|
|
setT0Data(content);
|
|
|
+ // todo 写入缓存
|
|
|
}
|
|
|
log.info("setTitleAvgViewCount cost:{}", System.currentTimeMillis() - start);
|
|
|
}
|