فهرست منبع

添加智能投放素材视频拉取任务

syh 4 سال پیش
والد
کامیت
7c643ff524
1فایلهای تغییر یافته به همراه30 افزوده شده و 25 حذف شده
  1. 30 25
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

+ 30 - 25
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -56,15 +56,16 @@ public class SampleTest {
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
     @Autowired
-    private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
-    @Autowired
     private ICtopOauthTokenService tokenService;
     @Autowired
-    private IKuaishouInterfaceService iKuaishouInterfaceService;
-    @Autowired
     private IKuaiShouVideoGetService videoGetService;
     @Autowired
     private IKuaishouVideoRelateCreativesService kuaishouVideoRelateCreativesService;
+    @Autowired
+    private IBindAccountLoginService bindAccountLoginService;
+    @Autowired
+    private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
+
 
     @Test
     public void loadBytedanceCreativeData() throws ParseException {
@@ -91,21 +92,8 @@ public class SampleTest {
             dateList.add(photoIds);
             kuaishouVideoRelateCreativesService.videoRelateCreatives(9743746L, dateList, statdateMap);
         }
-
-
-      /*  QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq("media_id", 2);
-        List<CtopOauthToken> list = oauthTokenService.list(queryWrapper);
-        for (CtopOauthToken token : list) {
-            kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-20", "2020-09-20", "daily");
-        }*/
     }
 
-    @Autowired
-    private IBindAccountLoginService bindAccountLoginService;
-    @Autowired
-    private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
-
     @Test
     public void loadKuaishouCookie() {
         List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
@@ -401,26 +389,30 @@ public class SampleTest {
 
     @Test
     public void execute() {
-        String accountIds = "1675239584963662,1675237415468045";
+        String accountIds = "1679063493763085";
         String[] arrays = accountIds.split(",");
         for (int i = 0; i < arrays.length; i++) {
             Long accountId = Long.parseLong(arrays[i]);
             CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
             load12Data(token);
-            load12AccountData(token);
+//            load12AccountData(token);
         }
     }
 
     private void load12AccountData(CtopOauthToken token) {
-        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-01", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-11", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-21", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
-        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-21", "yyyy-MM-dd"), DateUtils.parseDate("2020-12-31", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-01", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-11", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-11", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-21", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-21", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-31", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
     }
 
     private void load12Data(CtopOauthToken token) {
-        bytedanceReportService.bytedanceMaterialReport(token, "2020-12-01", "2020-12-11");
-        bytedanceReportService.bytedanceMaterialReport(token, "2020-12-11", "2020-12-21");
-        bytedanceReportService.bytedanceMaterialReport(token, "2020-12-21", "2020-12-31");
+//        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");
     }
 
     @Autowired
@@ -485,6 +477,19 @@ public class SampleTest {
     }
 
     @Test
+    public void testCreatePlan() {
+//        List<AiKuaishouAccountTargetTemplate> accountTargetTemplates = aiKuaishouAccountTargetTemplateService.getAllEffectTemplate();
+//        if (null == accountTargetTemplates || accountTargetTemplates.isEmpty()) {
+//            return;
+//        }
+        AiKuaishouAccountTargetTemplate accountTargetTemplate1 = aiKuaishouAccountTargetTemplateService.getById(30002);
+        aiKuaishouNewCreateCampaign.kuaishouAiAdsNewMaterialCreativity(accountTargetTemplate1);
+
+        AiKuaishouAccountTargetTemplate accountTargetTemplate2 = aiKuaishouAccountTargetTemplateService.getById(30001);
+        aiKuaishouNewCreateCampaign.kuaishouAiAdsNewMaterialCreativity(accountTargetTemplate2);
+    }
+
+    @Test
     public void etlKuaishouProjectData(){
         String dateString = "2020-03-17";
         Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");