|
@@ -3,6 +3,7 @@ package cn.com.ctop.job.bytedance.controller;
|
|
|
import cn.com.ctop.job.bytedance.data.service.IAdminAdvertiserListService;
|
|
import cn.com.ctop.job.bytedance.data.service.IAdminAdvertiserListService;
|
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceAccountReportService;
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceAccountReportService;
|
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceProductReportService;
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceProductReportService;
|
|
|
|
|
+import cn.com.ctop.job.bytedance.data.service.IBytedancePromoterReportService;
|
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -39,14 +40,31 @@ public class BytedanceController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IBytedanceAccountReportService accountReportService;
|
|
private IBytedanceAccountReportService accountReportService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IBytedancePromoterReportService promoterReportService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@GetMapping("/accountReport")
|
|
@GetMapping("/accountReport")
|
|
|
public void getChannel(String param) {
|
|
public void getChannel(String param) {
|
|
|
- String[] s = param.split("_");
|
|
|
|
|
- Long advertiserId = Long.valueOf(s[0]);
|
|
|
|
|
- String accessToken = s[1];
|
|
|
|
|
- accountReportService.getBytedanceAccountDaily(advertiserId, accessToken, "2025-03-27", "2025-03-27", 1, 1);
|
|
|
|
|
- accountReportService.getBytedanceAccountHour(advertiserId, accessToken, "2025-03-27", "2025-03-27", 1, 1);
|
|
|
|
|
|
|
+ List<JSONObject> allList = promoterReportService.getAllList();
|
|
|
|
|
+ for (int i = 0; i < allList.size(); i++) {
|
|
|
|
|
+ JSONObject jsonObject = allList.get(i);
|
|
|
|
|
+ Long advertiserId = jsonObject.getLong("advertiserId");
|
|
|
|
|
+ String accessToken = jsonObject.getString("accessToken");
|
|
|
|
|
+
|
|
|
|
|
+ dailyRetrExecutorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ if (!Check.isNull(accessToken)) {
|
|
|
|
|
+ accountReportService.getBytedanceAccountDaily(advertiserId, accessToken, "2025-02-15", "2025-03-25", 1, 1);
|
|
|
|
|
+ // accountReportService.getBytedanceAccountHour(advertiserId, accessToken, "2025-02-15", "2025-03-25", 1, 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@GetMapping("/productData")
|
|
@GetMapping("/productData")
|