| 
					
				 | 
			
			
				@@ -35,9 +35,7 @@ import com.tzld.longarticle.recommend.server.repository.crawler.AccountAvgInfoRe 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.repository.crawler.ArticleDetailInfoRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.repository.crawler.ArticleRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.repository.crawler.PublishSortLogRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.tzld.longarticle.recommend.server.repository.longArticle.ArticleCategoryRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.tzld.longarticle.recommend.server.repository.longArticle.ArticlePoolPromotionSourceRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.tzld.longarticle.recommend.server.repository.longArticle.DatastatScoreRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.tzld.longarticle.recommend.server.repository.longArticle.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.service.recommend.score.ScoreStrategy; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.util.DateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.longarticle.recommend.server.util.MapBuilder; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -95,6 +93,10 @@ public class DataDashboardService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ArticleCategoryRepository articleCategoryRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ArticlePoolPromotionSourceRepository articlePoolPromotionSourceRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private LongArticleTitleAuditRepository titleAuditRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private LongArticleCrawlerVideoRepository crawlerVideoRepository; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApolloJsonValue("${export.account.ghId:[]}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private static List<String> ghIdList; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1952,4 +1954,67 @@ public class DataDashboardService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @XxlJob("videoAuditExport") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public ReturnT<String> videoAuditExportJob(String param) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<String> dateStrList = DateUtils.getBeforeDays(null, null, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        videoAuditExport(dateStrList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return ReturnT.SUCCESS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void videoAuditExport(String dateStr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (!StringUtils.hasText(dateStr)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            dateStr = DateUtils.getBeforeDaysDateStr("yyyyMMdd", 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        videoAuditExport(Collections.singletonList(dateStr)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void videoAuditExport(List<String> dateStrList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<VideoAuditExport> exportList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        dateStrList = Lists.reverse(dateStrList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (String dateStr : dateStrList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            exportList.add(buildVideoAuditExport(dateStr)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtil.isEmpty(exportList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        int rowNum = exportList.size(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<List<Object>> rows = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Field[] fields = VideoAuditExport.class.getDeclaredFields(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        for (VideoAuditExport datum : exportList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<Object> rowDatas = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            rows.add(rowDatas); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            for (Field field : fields) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                field.setAccessible(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    rowDatas.add(field.get(datum)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } catch (IllegalAccessException e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    log.error("获取值出错:{}", field.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new RuntimeException(e.getMessage()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        doSendFeishuSheet(dateStrList, dailyDetailSheetToken, "vddANt", rowNum, rows, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                2, null, null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private VideoAuditExport buildVideoAuditExport(String dateStr) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        VideoAuditExport result = new VideoAuditExport(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long timestamp = DateUtils.getStartOfDay(dateStr, "yyyyMMdd") * 1000; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long articleAuditCount = titleAuditRepository.countByAuditTimestampBetween(timestamp, timestamp + 86400000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long articleAuditPassCount = titleAuditRepository.countByStatusAndAuditTimestampBetween( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ProduceContentAuditStatusEnum.pass.getVal(), timestamp, timestamp + 86400000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long videoAuditCount = crawlerVideoRepository.countByAuditTimestampBetween(timestamp, timestamp + 86400000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        long videoAuditPassCount = crawlerVideoRepository.countByStatusAndAuditTimestampBetween( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                ProduceContentAuditStatusEnum.pass.getVal(), timestamp, timestamp + 86400000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setDateStr(dateStr); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setArticleAuditCount(articleAuditCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setArticleAuditPassCount(articleAuditPassCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setVideoAuditCount(videoAuditCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        result.setVideoAuditPassCount(videoAuditPassCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |