|
@@ -409,28 +409,10 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void loadBDAccoutData() {
|
|
public void loadBDAccoutData() {
|
|
-// List<BytedanceAccountReportTaskRecord> records = reportTaskRecordService.listByParams(1,"ACCOUNT_DAILY");
|
|
|
|
- List<BytedanceAccountReportTaskRecord> records = reportTaskRecordService.listByParams(100,"ACCOUNT_DAILY");
|
|
|
|
- executorService = Executors.newFixedThreadPool(8);
|
|
|
|
- countDownLatch = new CountDownLatch(records.size());
|
|
|
|
- records.forEach(record -> executorService.submit(() -> {
|
|
|
|
- try {
|
|
|
|
-// reportService.getAdvertiserReport(record, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
|
-// log.info("账户数据获取完成:account:{},时间:{}-{}",record.getAccountId(),record.getStartDate(),record.getEndDate());
|
|
|
|
- bytedanceReportService.bytedanceMaterialReportV2(record);
|
|
|
|
- log.info("素材数据获取完成:account:{},时间:{}-{}",record.getAccountId(),record.getStartDate(),record.getEndDate());
|
|
|
|
- } catch (Exception e) {
|
|
|
|
-
|
|
|
|
- } finally {
|
|
|
|
- countDownLatch.countDown();
|
|
|
|
- }
|
|
|
|
- }));
|
|
|
|
- try {
|
|
|
|
- countDownLatch.await();
|
|
|
|
- } catch (InterruptedException e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- System.out.println("数据获取完成");
|
|
|
|
|
|
+ CtopOauthToken token1 = tokenService.getTokenByAccountId(1665924577326087L);
|
|
|
|
+ load12Data(token1);
|
|
|
|
+ CtopOauthToken token2 = tokenService.getTokenByAccountId(1674206482908163L);
|
|
|
|
+ load12Data(token2);
|
|
bytedanceReportMaterialDailyMapper.updateImageReportCode();
|
|
bytedanceReportMaterialDailyMapper.updateImageReportCode();
|
|
bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
|
|
bytedanceReportMaterialDailyMapper.updateImageReportProjectId();
|
|
bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
|
|
bytedanceReportMaterialDailyMapper.updateImageReportProjectName();
|
|
@@ -448,13 +430,10 @@ public class SampleTest {
|
|
}
|
|
}
|
|
|
|
|
|
private void load12Data(CtopOauthToken token) {
|
|
private void load12Data(CtopOauthToken token) {
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-01", "2020-10-05");
|
|
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-06", "2020-10-10");
|
|
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-11", "2020-10-15");
|
|
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-16", "2020-10-20");
|
|
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-21", "2020-10-25");
|
|
|
|
-// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-26", "2020-10-31");
|
|
|
|
- bytedanceReportService.bytedanceMaterialReport(token, "2020-10-03", "2020-10-04");
|
|
|
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-10-11", "2020-10-15");
|
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-10-16", "2020-10-20");
|
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-10-21", "2020-10-25");
|
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-10-26", "2020-10-31");
|
|
}
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|