| 
					
				 | 
			
			
				@@ -32,7 +32,9 @@ import java.util.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Slf4j 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public class RickVideoCacheJob { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Value("${wechat.risk.video.table:loghubods.wechat_feed_block_videolist}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private static final String PROJECT = "loghubods"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Value("${wechat.risk.video.table:wechat_feed_block_videolist}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private String riskVideoTable; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -48,8 +50,8 @@ public class RickVideoCacheJob { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         XxlJobLogger.log("updateRiskVideoCacheHandler start..."); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //1. 从大数据读取数据 最大不超过10万条 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String sql = "SELECT videoid FROM " + riskVideoTable + " WHERE dt = MAX_PT('" + riskVideoTable + "') limit 100000;"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            List<Record> records = odpsManager.query(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String dt = "MAX_PT('" + PROJECT + "." + riskVideoTable + "')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            List<Record> records = odpsManager.tableTunnelQuery(PROJECT, riskVideoTable, "dt=" + dt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (Objects.isNull(records) || records.isEmpty()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 XxlJobLogger.log("records is empty"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //无数据 清空缓存 
			 |