Jelajahi Sumber

bytedance cdp 增加字段

hpk 1 tahun lalu
induk
melakukan
c40e8fec67

+ 16 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/BytedanceController.java

@@ -32,7 +32,7 @@ public class BytedanceController {
     @Autowired
     private IBytedanceProductReportService productReportService;
 
-    private static final ExecutorService dailyRetrExecutorService = Executors.newFixedThreadPool(3);
+    private static final ExecutorService dailyRetrExecutorService = Executors.newFixedThreadPool(10);
 
     @Autowired
     private IAdminAdvertiserListService adminAdvertiserListService;
@@ -182,6 +182,21 @@ public class BytedanceController {
     }
 
     /**
+     * 补全有消耗字节项目数据
+     */
+    @GetMapping("/costProject")
+    public void costProject(@RequestParam(required = false) Long advertiserId, String startDate, String endDate) {
+        List<JSONObject> costAccount = productReportService.getCostAccount(advertiserId, startDate, endDate);
+        for (JSONObject jsonObject : costAccount) {
+            dailyRetrExecutorService.submit(() -> {
+                Long adverId = jsonObject.getLong("advertiserId");
+                cdpProjectService.getProjectList(adverId, null, null, null);
+                cdpProjectService.getProjectList(adverId, null, "del", null);
+            });
+        }
+    }
+
+    /**
      * 回调补全字节项目数据
      */
     @RequestMapping("/rebackProjectInfo")