yumeng vor 2 Wochen
Ursprung
Commit
64a57d3ad1

+ 3 - 2
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/BytedanceController.java

@@ -47,9 +47,10 @@ public class BytedanceController {
 
     @PostMapping(value = "/getBytedanceVideoByAccountId")
     public Map<String, String> getBytedanceVideoByAccountId(@RequestBody JSONObject jsonObject) {
-        Long accountId = 1839154028649483L;
+
+        Long accountId = jsonObject.getLong("accountId");
         String token = tokenService.getByAccountId(accountId);
-        bytedanceReportNewService.getAdvertiserDailyReport(accountId, token, "2025-08-30", "2025-09-02", 1);
+        bytedanceReportNewService.getAdvertiserDailyReport(accountId, token, "2025-09-25", "2025-09-25", 1);
         return null;
     }
 

+ 2 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/BytedanceReportNewServiceImpl.java

@@ -124,6 +124,7 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
     @Override
     public void getAdvertiserDailyReport(Long advertiserId, String oauthToken, String startDate, String endDate, int page) {
         try {
+            Thread.sleep(500L);
             String url = "https://api.oceanengine.com/open_api/v3.0/report/custom/get/";
             Map<String, Object> paramsMap = new HashMap<>();
             paramsMap.put("advertiser_id", advertiserId);
@@ -201,7 +202,7 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
             }
             if (dailies.size() >= 100) {
                 try {
-                    Thread.sleep(200L);
+                    Thread.sleep(500L);
                 } catch (InterruptedException e) {
                     throw new RuntimeException(e);
                 }

+ 1 - 1
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/BytedanceAdvertiseLoadJob.java

@@ -34,7 +34,7 @@ public class BytedanceAdvertiseLoadJob {
     @Autowired
     private IOauthTokenService tokenService;
 
-    private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(5);
+    private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(3);
     private static ExecutorService hourExecutorService = Executors.newFixedThreadPool(5);
     private static ExecutorService txExecutorService = Executors.newFixedThreadPool(10);
     @Autowired