| 
														
															@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONArray; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.alibaba.fastjson.JSONObject; 
														 | 
														
														 | 
														
															 import com.alibaba.fastjson.JSONObject; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue; 
														 | 
														
														 | 
														
															 import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.google.common.collect.Lists; 
														 | 
														
														 | 
														
															 import com.google.common.collect.Lists; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.tzld.longarticle.recommend.server.common.enums.StatusEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.AccountBusinessTypeEnum; 
														 | 
														
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.AccountBusinessTypeEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.ArticleTypeEnum; 
														 | 
														
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.ArticleTypeEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.ContentPoolEnum; 
														 | 
														
														 | 
														
															 import com.tzld.longarticle.recommend.server.common.enums.recommend.ContentPoolEnum; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -97,21 +98,43 @@ public class DataDashboardService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public void export(String beginDate, String endDate) { 
														 | 
														
														 | 
														
															     public void export(String beginDate, String endDate) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<String> dateStrList = DateUtils.getBeforeDays(beginDate, endDate, 5); 
														 | 
														
														 | 
														
															         List<String> dateStrList = DateUtils.getBeforeDays(beginDate, endDate, 5); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        exportFeishuNewSortStrategy(dateStrList, ArticleTypeEnum.QUNFA.getVal(), StatusEnum.ZERO.getCode(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                sheetToken, "7d4e12"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @XxlJob("scheduledExport") 
														 | 
														
														 | 
														
															     @XxlJob("scheduledExport") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public ReturnT<String> scheduledExport(String param) { 
														 | 
														
														 | 
														
															     public ReturnT<String> scheduledExport(String param) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<String> dateStrList = DateUtils.getBeforeDays(null, null, 5); 
														 | 
														
														 | 
														
															         List<String> dateStrList = DateUtils.getBeforeDays(null, null, 5); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        exportFeishuNewSortStrategy(dateStrList, sheetToken, "7d4e12"); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        exportFeishuNewSortStrategy(dateStrList, ArticleTypeEnum.QUNFA.getVal(), StatusEnum.ZERO.getCode(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                sheetToken, "7d4e12"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         return ReturnT.SUCCESS; 
														 | 
														
														 | 
														
															         return ReturnT.SUCCESS; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public void exportWuXianLiu(String beginDate, String endDate) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<String> dateStrList = DateUtils.getBeforeDays(beginDate, endDate, 5); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        exportFeishuNewSortStrategy(dateStrList, ArticleTypeEnum.WUXIANLIU.getVal(), StatusEnum.ONE.getCode(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                sheetToken, "Ucycvw"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    private void exportFeishuNewSortStrategy(List<String> dateStrList, String sheetToken, String sheetId) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @XxlJob("scheduledExportWuXianLiu") 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    public ReturnT<String> scheduledExportWuXianLiu(String param) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<String> dateStrList = DateUtils.getBeforeDays(null, null, 5); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        exportFeishuNewSortStrategy(dateStrList, ArticleTypeEnum.WUXIANLIU.getVal(), StatusEnum.ONE.getCode(), 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                sheetToken, "Ucycvw"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return ReturnT.SUCCESS; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private void exportFeishuNewSortStrategy(List<String> dateStrList, String articleType, Integer filter, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                             String sheetToken, String sheetId) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String minDate = dateStrList.stream().min(String::compareTo).orElse(""); 
														 | 
														
														 | 
														
															         String minDate = dateStrList.stream().min(String::compareTo).orElse(""); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String maxDate = dateStrList.stream().max(String::compareTo).orElse(""); 
														 | 
														
														 | 
														
															         String maxDate = dateStrList.stream().max(String::compareTo).orElse(""); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        List<NewSortStrategyExport> newContentsYesData = newSortStrategyData(minDate, maxDate); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<NewSortStrategyExport> newContentsYesData = newSortStrategyData(minDate, maxDate, articleType); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if (CollectionUtil.isNotEmpty(newContentsYesData) && filter == StatusEnum.ONE.getCode()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            newContentsYesData = newContentsYesData.stream() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    .filter(o -> Objects.nonNull(o.getPublishMiniProgramNum()) && o.getPublishMiniProgramNum() > 0) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    .collect(Collectors.toList()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (CollectionUtil.isEmpty(newContentsYesData)) { 
														 | 
														
														 | 
														
															         if (CollectionUtil.isEmpty(newContentsYesData)) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             return; 
														 | 
														
														 | 
														
															             return; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -154,7 +177,7 @@ public class DataDashboardService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         doSendFeishuSheet(dateStrList, sheetToken, sheetId, rowNum, rows, 2, styles); 
														 | 
														
														 | 
														
															         doSendFeishuSheet(dateStrList, sheetToken, sheetId, rowNum, rows, 2, styles); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-    private List<NewSortStrategyExport> newSortStrategyData(String beginDate, String endDate) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private List<NewSortStrategyExport> newSortStrategyData(String beginDate, String endDate, String articleType) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         long beginTimestamp = DateUtils.dateStrToTimestamp(beginDate, "yyyyMMdd"); 
														 | 
														
														 | 
														
															         long beginTimestamp = DateUtils.dateStrToTimestamp(beginDate, "yyyyMMdd"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         long endTimestamp = DateUtils.dateStrToTimestamp(endDate, "yyyyMMdd") + 86400; 
														 | 
														
														 | 
														
															         long endTimestamp = DateUtils.dateStrToTimestamp(endDate, "yyyyMMdd") + 86400; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<AccountAvgInfo> accountAvgInfoList = accountAvgInfoRepository.findAll(); 
														 | 
														
														 | 
														
															         List<AccountAvgInfo> accountAvgInfoList = accountAvgInfoRepository.findAll(); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -162,7 +185,7 @@ public class DataDashboardService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<String> ghIds = accountAvgInfoList.stream().map(AccountAvgInfo::getGhId).distinct().collect(Collectors.toList()); 
														 | 
														
														 | 
														
															         List<String> ghIds = accountAvgInfoList.stream().map(AccountAvgInfo::getGhId).distinct().collect(Collectors.toList()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<Article> articleList = articleRepository.getByGhIdInAndPublishTimestampBetweenAndTypeEquals(ghIds, 
														 | 
														
														 | 
														
															         List<Article> articleList = articleRepository.getByGhIdInAndPublishTimestampBetweenAndTypeEquals(ghIds, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                beginTimestamp, endTimestamp, ArticleTypeEnum.QUNFA.getVal()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                beginTimestamp, endTimestamp, articleType); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, Map<String, Map<Integer, Article>>> articleMap = articleList.stream().collect(Collectors.groupingBy(Article::getGhId, 
														 | 
														
														 | 
														
															         Map<String, Map<String, Map<Integer, Article>>> articleMap = articleList.stream().collect(Collectors.groupingBy(Article::getGhId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 Collectors.groupingBy(Article::getAppMsgId, Collectors.toMap(Article::getItemIndex, o -> o)))); 
														 | 
														
														 | 
														
															                 Collectors.groupingBy(Article::getAppMsgId, Collectors.toMap(Article::getItemIndex, o -> o)))); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         log.info("newSortStrategyData articleList finish"); 
														 | 
														
														 | 
														
															         log.info("newSortStrategyData articleList finish"); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -296,7 +319,7 @@ public class DataDashboardService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<Article> hisArticleList = new ArrayList<>(); 
														 | 
														
														 | 
														
															         List<Article> hisArticleList = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         List<List<String>> titleMd5Partition = Lists.partition(new ArrayList<>(titleMd5List), 1000); 
														 | 
														
														 | 
														
															         List<List<String>> titleMd5Partition = Lists.partition(new ArrayList<>(titleMd5List), 1000); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         for (List<String> titleMd5s : titleMd5Partition) { 
														 | 
														
														 | 
														
															         for (List<String> titleMd5s : titleMd5Partition) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            hisArticleList.addAll(articleRepository.getByTitleMd5InAndTypeEqualsAndStatusEquals(titleMd5s, ArticleTypeEnum.QUNFA.getVal(), 1)); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            hisArticleList.addAll(articleRepository.getByTitleMd5InAndTypeEqualsAndStatusEquals(titleMd5s, articleType, 1)); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         log.info("newSortStrategyData hisArticleList finish"); 
														 | 
														
														 | 
														
															         log.info("newSortStrategyData hisArticleList finish"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Map<String, List<Article>> hisArticleMap = hisArticleList.stream().collect(Collectors.groupingBy(Article::getTitle)); 
														 | 
														
														 | 
														
															         Map<String, List<Article>> hisArticleMap = hisArticleList.stream().collect(Collectors.groupingBy(Article::getTitle)); 
														 |