| 
															
																@@ -23,6 +23,7 @@ public class UnitReportJob { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private IOauthTokenService tokenService; 
															 | 
															
															 | 
															
																     private IOauthTokenService tokenService; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
															
															 | 
															
																     private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private static ExecutorService adSceneDailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
															
															 | 
															
																     private static ExecutorService adSceneDailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+    private static ExecutorService adSceneDailyExecutorService2 = Executors.newFixedThreadPool(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private static ExecutorService placementTypeDailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
															
															 | 
															
																     private static ExecutorService placementTypeDailyExecutorService = Executors.newFixedThreadPool(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     private static ExecutorService hourExecutorService = Executors.newFixedThreadPool(3); 
															 | 
															
															 | 
															
																     private static ExecutorService hourExecutorService = Executors.newFixedThreadPool(3); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     @Autowired 
															 | 
															
															 | 
															
																     @Autowired 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -67,10 +68,18 @@ public class UnitReportJob { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     public void unitAdSceneTypeDailyReport() throws Exception { 
															 | 
															
															 | 
															
																     public void unitAdSceneTypeDailyReport() throws Exception { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         String nowDate = DateUtils.getNowDate("yyyy-MM-dd"); 
															 | 
															
															 | 
															
																         String nowDate = DateUtils.getNowDate("yyyy-MM-dd"); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); 
															 | 
															
															 | 
															
																         String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         List<JSONObject> tokens = tokenService.getByProjectId(458L);    //淘特项目 
															 | 
															
															 | 
															
																         List<JSONObject> tokens = tokenService.getByProjectId(458L);    //淘特项目 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         tokens.forEach(t -> adSceneDailyExecutorService.submit(() -> { 
															 | 
															
															 | 
															
																         tokens.forEach(t -> adSceneDailyExecutorService.submit(() -> { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            unitReportDailyService.getUnitAdSceneReportDaily(t.getLong("accountId"), t.getString("accessToken"), startDate, endDate, 1); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            unitReportDailyService.getUnitAdSceneReportDaily(t.getLong("accountId"), t.getString("accessToken"), startDate, startDate, 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        })); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        tokens.forEach(t -> adSceneDailyExecutorService2.submit(() -> { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            try { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                Thread.sleep(500L); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                unitReportDailyService.getUnitAdSceneReportDaily(t.getLong("accountId"), t.getString("accessToken"), endDate, endDate, 1); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } catch (InterruptedException e) { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                e.printStackTrace(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         })); 
															 | 
															
															 | 
															
																         })); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     } 
															 | 
															
															 | 
															
																     } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 |