|
@@ -400,6 +400,13 @@ public class DataDashboardService {
|
|
|
log.info("newSortStrategyData hisArticleDetailInfoList finish");
|
|
log.info("newSortStrategyData hisArticleDetailInfoList finish");
|
|
|
Map<String, List<ArticleDetailInfo>> hisArticleDetailInfoMap = hisArticleDetailInfoList.stream()
|
|
Map<String, List<ArticleDetailInfo>> hisArticleDetailInfoMap = hisArticleDetailInfoList.stream()
|
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
|
|
|
+ // 品类查询
|
|
|
|
|
+ List<ArticleCategory> categoryList = articleCategoryRepository.getByStatusAndVersion(ArticleCategoryStatusEnum.SUCCESS.getCode(), activeVersion);
|
|
|
|
|
+ Map<String, ArticleCategory> categoryMap = categoryList.stream()
|
|
|
|
|
+ .collect(Collectors.toMap(ArticleCategory::getProduceContentId, Function.identity()));
|
|
|
|
|
+ Map<String, ArticleCategory> titleCategoryMap = categoryList.stream()
|
|
|
|
|
+ .collect(Collectors.toMap(ArticleCategory::getTitleMd5, Function.identity(), (a, b) -> a));
|
|
|
|
|
+ log.info("newSortStrategyData categoryList finish");
|
|
|
|
|
|
|
|
// result
|
|
// result
|
|
|
List<DatastatSortStrategy> saveList = new ArrayList<>();
|
|
List<DatastatSortStrategy> saveList = new ArrayList<>();
|
|
@@ -458,6 +465,14 @@ public class DataDashboardService {
|
|
|
setObjAigcInfo(article, obj, date, publishAccountMap, publishContentMap, publishContentLayoutMap,
|
|
setObjAigcInfo(article, obj, date, publishAccountMap, publishContentMap, publishContentLayoutMap,
|
|
|
publishPlanMap, miniprogramTaskMap, planExeRecordMap, producePlanMap, inputSourceMap,
|
|
publishPlanMap, miniprogramTaskMap, planExeRecordMap, producePlanMap, inputSourceMap,
|
|
|
resultRelMap, crawlerPlanMap, sourceTitlePlanMap, videoPoolSourceMap);
|
|
resultRelMap, crawlerPlanMap, sourceTitlePlanMap, videoPoolSourceMap);
|
|
|
|
|
+ ArticleCategory articleCategory = categoryMap.get(obj.getSourceId());
|
|
|
|
|
+ if (Objects.isNull(articleCategory)) {
|
|
|
|
|
+ String titleMd5 = Md5Util.encoderByMd5(obj.getTitle());
|
|
|
|
|
+ articleCategory = titleCategoryMap.get(titleMd5);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Objects.nonNull(articleCategory)) {
|
|
|
|
|
+ obj.setCategory(articleCategory.getCategory());
|
|
|
|
|
+ }
|
|
|
saveList.add(obj);
|
|
saveList.add(obj);
|
|
|
}
|
|
}
|
|
|
log.info("newSortStrategyData buildData finish");
|
|
log.info("newSortStrategyData buildData finish");
|
|
@@ -1288,6 +1303,13 @@ public class DataDashboardService {
|
|
|
log.info("newSortStrategyFWHData hisArticleDetailInfoList finish");
|
|
log.info("newSortStrategyFWHData hisArticleDetailInfoList finish");
|
|
|
Map<String, List<ArticleDetailInfo>> hisArticleDetailInfoMap = hisArticleDetailInfoList.stream()
|
|
Map<String, List<ArticleDetailInfo>> hisArticleDetailInfoMap = hisArticleDetailInfoList.stream()
|
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
.collect(Collectors.groupingBy(ArticleDetailInfo::getWxSn));
|
|
|
|
|
+ // 品类查询
|
|
|
|
|
+ List<ArticleCategory> categoryList = articleCategoryRepository.getByStatusAndVersion(ArticleCategoryStatusEnum.SUCCESS.getCode(), activeVersion);
|
|
|
|
|
+ Map<String, ArticleCategory> categoryMap = categoryList.stream()
|
|
|
|
|
+ .collect(Collectors.toMap(ArticleCategory::getProduceContentId, Function.identity()));
|
|
|
|
|
+ Map<String, ArticleCategory> titleCategoryMap = categoryList.stream()
|
|
|
|
|
+ .collect(Collectors.toMap(ArticleCategory::getTitleMd5, Function.identity(), (a, b) -> a));
|
|
|
|
|
+ log.info("newSortStrategyFWHData categoryList finish");
|
|
|
|
|
|
|
|
// result
|
|
// result
|
|
|
List<DatastatSortStrategy> saveList = new ArrayList<>();
|
|
List<DatastatSortStrategy> saveList = new ArrayList<>();
|
|
@@ -1338,6 +1360,14 @@ public class DataDashboardService {
|
|
|
setObjAigcInfo(article, obj, date, publishAccountMap, publishContentMap, publishContentLayoutMap,
|
|
setObjAigcInfo(article, obj, date, publishAccountMap, publishContentMap, publishContentLayoutMap,
|
|
|
publishPlanMap, miniprogramTaskMap, planExeRecordMap, producePlanMap, inputSourceMap,
|
|
publishPlanMap, miniprogramTaskMap, planExeRecordMap, producePlanMap, inputSourceMap,
|
|
|
resultRelMap, crawlerPlanMap, sourceTitlePlanMap, videoPoolSourceMap);
|
|
resultRelMap, crawlerPlanMap, sourceTitlePlanMap, videoPoolSourceMap);
|
|
|
|
|
+ ArticleCategory articleCategory = categoryMap.get(obj.getSourceId());
|
|
|
|
|
+ if (Objects.isNull(articleCategory)) {
|
|
|
|
|
+ String titleMd5 = Md5Util.encoderByMd5(obj.getTitle());
|
|
|
|
|
+ articleCategory = titleCategoryMap.get(titleMd5);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Objects.nonNull(articleCategory)) {
|
|
|
|
|
+ obj.setCategory(articleCategory.getCategory());
|
|
|
|
|
+ }
|
|
|
saveList.add(obj);
|
|
saveList.add(obj);
|
|
|
}
|
|
}
|
|
|
log.info("newSortStrategyFWHData buildData finish");
|
|
log.info("newSortStrategyFWHData buildData finish");
|