|
@@ -173,8 +173,8 @@ public class DataDashboardService {
|
|
|
doSendFeishuSheet(dateStrList, sheetToken, sheetId, rowNum, rows, 2, styles, delDateStrList);
|
|
|
}
|
|
|
|
|
|
- private List<NewSortStrategyExport> newSortStrategyData(String beginDate, String endDate,
|
|
|
- String articleType, Integer filter) {
|
|
|
+ public List<NewSortStrategyExport> newSortStrategyData(String beginDate, String endDate,
|
|
|
+ String articleType, Integer filter) {
|
|
|
long beginTimestamp = DateUtils.dateStrToTimestamp(beginDate, "yyyyMMdd");
|
|
|
long endTimestamp = DateUtils.dateStrToTimestamp(endDate, "yyyyMMdd") + 86400;
|
|
|
List<AccountAvgInfo> accountAvgInfoList = accountAvgInfoRepository.findAll();
|
|
@@ -378,6 +378,7 @@ public class DataDashboardService {
|
|
|
Objects.equals(articleType, ArticleTypeEnum.WUXIANLIU.getVal())) {
|
|
|
obj.setStrategy(RankStrategyEnum.INFINITE_STRATEGY.getStrategy());
|
|
|
}
|
|
|
+ setObjSortInfo(article, obj, date);
|
|
|
setObjAvgInfo(article, obj, indexAvgInfoMap);
|
|
|
setObjHisRateInfo(article, obj, hisArticleMap, accountAvgInfoIndexMap, hisArticleDetailInfoMap);
|
|
|
// aigc 数据
|
|
@@ -404,6 +405,27 @@ public class DataDashboardService {
|
|
|
return NewSortStrategyExport.dbObjToExportObj(saveList);
|
|
|
}
|
|
|
|
|
|
+ private void setObjSortInfo(Article article, DatastatSortStrategy obj, String date) {
|
|
|
+ if (StringUtils.hasText(obj.getStrategy())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ List<String> dateStrList = DateUtils.getBeforeDays(date, date, 7);
|
|
|
+ List<PublishSortLog> sortLogList = publishSortLogRepository.getByGhIdInAndDateStrIn(
|
|
|
+ Collections.singletonList(article.getGhId()), dateStrList);
|
|
|
+ if (CollectionUtils.isEmpty(sortLogList)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (PublishSortLog sortLog : sortLogList) {
|
|
|
+ if (sortLog.getTitle().equals(article.getTitle())
|
|
|
+ && Objects.equals(sortLog.getIndex(), article.getItemIndex())) {
|
|
|
+ obj.setSourceType(sortLog.getSourceType());
|
|
|
+ obj.setSourceId(sortLog.getSourceId());
|
|
|
+ obj.setStrategy(sortLog.getStrategy());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void setObjAigcInfo(Article article, DatastatSortStrategy obj, String date,
|
|
|
Map<String, PublishAccount> publishAccountMap,
|
|
|
Map<String, Map<String, Map<Long, PublishContentDTO>>> publishContentMap,
|