|
@@ -191,15 +191,17 @@ public class RecallService implements ApplicationContextAware {
|
|
|
// 根据produceContentId查询category
|
|
|
List<ArticleCategory> articleCategoryList = articleCategoryRepository.getByProduceContentIdIn(produceContentIds);
|
|
|
Map<String, ArticleCategory> categoryMap = articleCategoryList.stream().collect(Collectors.toMap(ArticleCategory::getProduceContentId, Function.identity()));
|
|
|
- contentList.forEach(content -> {
|
|
|
+ for (Content content : contentList) {
|
|
|
ArticlePoolPromotionSource source = sourceMap.get(content.getCrawlerChannelContentId());
|
|
|
if (Objects.nonNull(source) && Objects.nonNull(source.getRootProduceContentId())) {
|
|
|
ArticleCategory category = categoryMap.get(source.getRootProduceContentId());
|
|
|
if (Objects.nonNull(category)) {
|
|
|
content.setCategory(Collections.singletonList(category.getCategory()));
|
|
|
+ continue;
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ log.error("setContentCategory NullError channelContentId:{}", content.getCrawlerChannelContentId());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private List<CrawlerMetaArticle> getByUniqueIndexIn(List<String> md5List) {
|