Przeglądaj źródła

Merge remote-tracking branch 'origin/V1.1.3' into V1.1.3

jiequan.bi 4 lat temu
rodzic
commit
9c4a9207ba
31 zmienionych plików z 590 dodań i 475 usunięć
  1. 24 140
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 0 55
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouSuZaoLoadJob.java
  3. 8 8
      jeecg-boot-module-system/src/main/resources/application-wps.yml
  4. 6 3
      jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties
  5. 92 15
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  6. 1 1
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiSuzaoVideoJob.java
  7. 0 34
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouSuZaoLoadJob.java
  8. 31 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaiShouAppInfoController.java
  9. 9 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAdvertiserStrategyController.java
  10. 8 6
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouCreativeRefusalController.java
  11. 1 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java
  12. 17 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiKuaishouAdvertiserStrategy.java
  13. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaiShouAppInfoServiceImpl.java
  14. 2 4
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/BatchController.java
  15. 8 43
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouVideoGet.java
  16. 8 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml
  17. 2 8
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouInterfaceService.java
  18. 0 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/ISyncPullMaterialService.java
  19. 0 3
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java
  20. 142 100
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java
  21. 0 28
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/SyncPullMaterialServiceImpl.java
  22. 70 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/entity/BytedanceMatReportTaskCheckInfo.java
  23. 18 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceMatReportTaskCheckInfoMapper.java
  24. 29 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceMatReportTaskCheckInfoMapper.xml
  25. 5 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceInterfaceService.java
  26. 14 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceMatReportTaskCheckInfoService.java
  27. 3 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceReportService.java
  28. 61 14
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceInterfaceServiceImpl.java
  29. 18 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceMatReportTaskCheckInfoServiceImpl.java
  30. 12 4
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java
  31. 1 0
      module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

+ 24 - 140
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -112,31 +112,6 @@ public class TestController {
     @Autowired
     private IBytedanceReportService bytedanceReportService;
 
-
-    @GetMapping("/loadMatData")
-    public Map<String, Object> getData(String startDate, String endDate, Long accountId) {
-        Map<String, Object> result = new HashMap<>();
-        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
-        Date start = DateUtils.parseDate(startDate, "yyyy-MM-dd");
-        int days = DateUtils.getdaysOfTwoDate(startDate, endDate) + 1;
-        for (int i = 0; i < days; i++) {
-            String getDate = DateUtils.formatDate(DateUtils.addDay(start, i));
-            // bytedanceReportService.bytedanceMaterialReport(token, getDate, getDate);
-
-            suzhaoService.submit(new Runnable() {
-                @Override
-                public void run() {
-                    bytedanceReportService.bytedanceMaterialReport(token, getDate, getDate);
-
-                }
-            });
-
-        }
-        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
-        return result;
-    }
-
-
     @GetMapping("/testKuaishou")
     public String kuaishouCallback(@RequestParam("auth_code") String authCode, @RequestParam("state") String state) {
         try {
@@ -673,38 +648,6 @@ public class TestController {
         return "success";
     }
 
-
-    @GetMapping(value = "/getSuZhao")
-    public void getSuZhao() throws JobExecutionException {
-        try {
-            //1:查询当日数据
-            QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
-            queryWrapper.eq("media_id", 2);
-            queryWrapper.orderByDesc("create_time");
-            List<CtopOauthToken> tokens = tokenService.list(queryWrapper);
-            if (null == tokens || tokens.size() <= 0) {
-                log.info("定时获取快手数据异常:未获取到可用的token");
-                return;
-            }
-
-            tokens.forEach(token -> {
-                suzhaoService.submit(new Runnable() {
-                    @Override
-                    public void run() {
-                        //1: 获取广告主信息数据
-                        log.info("获取素造素材:accountId:{}", token.getAccountId());
-                        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
-                    }
-                });
-            });
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-
-
-    }
-
-
     @GetMapping(value = "/getAccountList")
     public void getAccountList(String startDate, String endDate) throws JobExecutionException {
         Thread thread = new Thread() {
@@ -743,91 +686,9 @@ public class TestController {
     }
 
 
-    @GetMapping(value = "/getVideo")
-    public String getVideo(String startDate, String endDate) throws IOException {
-        try {
-            Thread thread = new Thread() {
-                @Override
-                public void run() {
-                    QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-                    tokenQueryWrapper.eq("media_id", 2);
-                    List<CtopOauthToken> list = tokenService.list(tokenQueryWrapper);
-                    list.forEach(token -> {
-                        videoService.submit(new Runnable() {
-                            @Override
-                            public void run() {
-                                try {
-                                    kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
-                                    kuaishouInterfaceService.getVideoList(token, null, null);
-                                    Thread.sleep(5000);
-                                     /*String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                                    String videoEndDate = DateUtils.addDay(nowDate, -180);
-                                   SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                                    Date end = simpleDateFormat.parse(nowDate);
-                                    Date start = simpleDateFormat.parse(videoEndDate);
-                                    List<Date> dates = DateUtils.findDates(start, end);
-                                    for (int i = 0; i < dates.size(); i++) {
-                                        String formatDate = simpleDateFormat.format(dates.get(i));
-                                        kuaishouInterfaceService.getImageList(token, formatDate);
-                                        Thread.sleep(500);
-                                    }*/
-
-                                } catch (Exception e) {
-                                    e.printStackTrace();
-                                } finally {
-                                }
-                            }
-                        });
-                    });
-                    log.info("快手物料数据同步完成");
-                }
-            };
-            thread.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return "Success";
-    }
 
 
-    @GetMapping(value = "/getVideoByAccountId")
-    public String getVideoByAccountId(Long accountId) throws IOException {
-        try {
-            Thread thread = new Thread() {
-                @Override
-                public void run() {
-                    QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
-                    tokenQueryWrapper.eq("media_id", 2);
-                    tokenQueryWrapper.eq("account_id", accountId);
-                    CtopOauthToken one = tokenService.getOne(tokenQueryWrapper);
-                    try {
-                        kuaishouInterfaceService.getSuZaoList(one.getAccessToken(), one.getAccountId(), 1, null, null);
-                        kuaishouInterfaceService.getVideoList(one, null, null);
-                        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                        String videoEndDate = DateUtils.addDay(nowDate, -180);
-                        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                        Date end = simpleDateFormat.parse(nowDate);
-                        Date start = simpleDateFormat.parse(videoEndDate);
-                        List<Date> dates = DateUtils.findDates(start, end);
-                        for (int i = 0; i < dates.size(); i++) {
-                            String formatDate = simpleDateFormat.format(dates.get(i));
-
-                            kuaishouInterfaceService.getImageList(one, formatDate);
-                            Thread.sleep(100);
-                        }
-                    } catch (Exception e) {
-                        e.printStackTrace();
-                    } finally {
-                    }
-                    log.info("快手物料数据同步完成");
-                }
-            };
-            thread.start();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return "Success";
-    }
+
 
 
     @GetMapping(value = "/createCutTask")
@@ -1469,4 +1330,27 @@ public class TestController {
         ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
         return result;
     }
+
+    @GetMapping("loadMatData")
+    public Map<String,Object>getData(String startDate,String endDate,Long accountId){
+        Map<String,Object>result = new HashMap<>();
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        Date start = DateUtils.parseDate(startDate,"yyyy-MM-dd");
+        int days = DateUtils.getdaysOfTwoDate(startDate,endDate)+1;
+        for (int i=0;i<days;i++){
+            String getDate = DateUtils.formatDate(DateUtils.addDay(start,i));
+            bytedanceReportService.bytedanceMaterialReport(token, getDate, getDate);
+        }
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
+
+    @GetMapping("loadAccountData")
+    public Map<String,Object>getData(Long accountId){
+        Map<String,Object>result = new HashMap<>();
+        CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
+        reportService.getAdvertiserReport(token, DateUtils.parseDate("2021-01-01","yyyy-MM-dd"), DateUtils.parseDate("2021-01-31","yyyy-MM-dd"),CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        return result;
+    }
 }

+ 0 - 55
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/job/KuaishouSuZaoLoadJob.java

@@ -1,55 +0,0 @@
-package org.jeecg.modules.ctop.job;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import lombok.extern.slf4j.Slf4j;
-import org.jeecg.common.util.DateUtils;
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Slf4j
-public class KuaishouSuZaoLoadJob implements Job {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-
-    static ExecutorService executorService = null;
-
-    @Override
-    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
-        Thread thread = new Thread() {
-            @Override
-            public void run() {
-                List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-                executorService = Executors.newFixedThreadPool(8);
-                tokens.forEach(token -> {
-                    executorService.submit(new Runnable() {
-                        @Override
-                        public void run() {
-                            try {
-                                String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-                                String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
-                                String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
-                                kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startDate, endDate);
-                            } catch (Exception e) {
-                                e.printStackTrace();
-                            } finally {
-                            }
-                        }
-                    });
-                });
-                log.info("快手素造数据同步完成");
-            }
-        };
-        thread.start();
-
-    }
-}

+ 8 - 8
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -95,16 +95,16 @@ spring:
         # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
-#        master:
-#          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
-#          username: hcst
-#          password: hcst@2020
-#          driver-class-name: com.mysql.jdbc.Driver
         master:
-          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-          username: data
-          password: hcst@2021
+          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
+          username: hcst
+          password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver
+#        master:
+#          url: jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: data
+#          password: hcst@2021
+#          driver-class-name: com.mysql.jdbc.Driver
   #redis 配置
   redis:
     database: 0

+ 6 - 3
jeecg-boot-module-system/src/main/resources/jeecg/jeecg_database.properties

@@ -1,8 +1,11 @@
 #mysql
 diver_name=com.mysql.jdbc.Driver
-url=jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-username=hcst
-password=hcst@2020
+#url=jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#username=hcst
+#password=hcst@2020
+url=jdbc:mysql://139.186.27.96:4000/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+username=data
+password=hcst@2021
 database_name=jeecg-boot
 #oracle
 #diver_name=oracle.jdbc.driver.OracleDriver

+ 92 - 15
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -46,7 +46,7 @@ import static org.jeecg.common.util.DateUtils.getAnotherDay;
 
 @RunWith(SpringRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
-@ActiveProfiles("wps")
+@ActiveProfiles("dev")
 @Slf4j
 public class SampleTest {
     @Autowired
@@ -67,13 +67,32 @@ public class SampleTest {
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
  /*   @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
+
 */
 
+
     @Test
     public void loadBytedanceCreativeData() throws ParseException {
         //    1662234704806924
-        CtopOauthToken tokenByAccountId = tokenService.getTokenByAccountId(1662234704806924L);
-        advertiserDataService.getMaterialList(tokenByAccountId);
+       /* CtopOauthToken token = new CtopOauthToken();
+        token.setAccountId(9549277L);
+        token.setAccessToken("bc5327c8f2bd8a67513e51148c9206c8");
+
+
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse = simpleDateFormat.parse("2021-02-02");
+        kuaishouInterfaceService.getAdvertiserReportDaily(token, parse, parse);*/
+
+        CtopOauthToken token = new CtopOauthToken();
+        token.setAccountId(9767055L);
+        token.setAccessToken("28e4e6b124e1443d6971ba4c699de6c9");
+
+        kuaishouInterfaceService.getVideoList(token, null, null);
+        kuaishouInterfaceService.getVideoInfo("28e4e6b124e1443d6971ba4c699de6c9",9767055L,"5208131540349742192");
+
+     /*   CtopOauthToken tokenByAccountId = tokenService.getTokenByAccountId(1662234704806924L);
+        advertiserDataService.getMaterialList(tokenByAccountId);*/
        /* getVideoByPage(token, "", 1);
         List<KuaiShouVideoGet> KuaiShouVideoGets = videoGetService.selectPhotoIdsByAccountId(9743746L);
         if (!Check.isNull(KuaiShouVideoGets)) {
@@ -264,16 +283,6 @@ public class SampleTest {
     }
 
     @Test
-    public void testData11() {
-        CtopOauthToken token = tokenService.getTokenByAccountId(9556344L);
-        int dimeDiff = 5;
-        Date now = new Date();
-        String startTime = DateUtils.formatDate("2021-01-11 18:25:00");
-        String endTime = DateUtils.formatDate(now, "2021-01-11 18:35:00");
-        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime, endTime);
-    }
-
-    @Test
     public void loadKuaishouAgentData() {
         kuaishouReportDailyAgentService.loginAgent();
         try {
@@ -528,10 +537,78 @@ public class SampleTest {
         aiKuaishouNewCreateCampaign.kuaishouAiAddNewMaterialCreativity(accountTargetTemplate2, 250);
     }
 
-    @Autowired
-    private IBytedancePlanDailyReportService planDailyReportService;
+    @Test
+    public void testLoadBytedanceDataV2(){
+        String accountIds=
+                "1675440464386062," +
+                        "1688606248211533," +
+                        "1669181787105294," +
+                        "1687571097467912," +
+                        "1650079154438157," +
+                        "1680697900744711," +
+                        "1678156679964680," +
+                        "1670727177043982," +
+                        "1676160388944910," +
+                        "1687559760306190," +
+                        "1687382871519240," +
+                        "1680312075164686," +
+                        "1675440465991688," +
+                        "1664657972166663," +
+                        "1688193173408782," +
+                        "1675616147056647," +
+                        "1687308848716814," +
+                        "1686394621234247," +
+                        "1683594409340935," +
+                        "1683676478859341," +
+                        "1686384860112904," +
+                        "1668290872519693," +
+                        "1674063202781191," +
+                        "1685024266033160," +
+                        "1669714891201544," +
+                        "1687758256277512," +
+                        "1675434231118856," +
+                        "1686394621807687," +
+                        "1678411706704903," +
+                        "1686223489547271," +
+                        "1660120711467022," +
+                        "1686833795211278," +
+                        "1680697899143175," +
+                        "1661313994984462," +
+                        "1661313995480077," +
+                        "1636295780727820," +
+                        "1676540490482759," +
+                        "1675342904713223," +
+                        "1686771461984327," +
+                        "1685841129360391," +
+                        "1683676477736973," +
+                        "1661313994470413," +
+                        "1663465141771272," +
+                        "1687758256732174," +
+                        "1686223482927117," +
+                        "1686835166313479," +
+                        "1642648003678215," +
+                        "1639753233213454," +
+                        "1675239584963662," +
+                        "1674634579279885," +
+                        "1650263841162253," +
+                        "1672178052130888";
+        String [] accountArray = accountIds.split(",");
+        for (int i=0;i<accountArray.length;i++){
+            CtopOauthToken token = tokenService.getTokenByAccountId(Long.parseLong(accountArray[i]));
+
+            reportService.getAdvertiserReport(token, DateUtils.parseDate("2021-01-14","yyyy-MM-dd"), DateUtils.parseDate("2021-01-14","yyyy-MM-dd"),CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
+        }
+    }
+
 
     @Test
+    public void checkBytedanceReport(){
+        CtopOauthToken token = tokenService.getTokenByAccountId(1678959391271949L);
+        String startDate = "2021-01-01 00:00:00";
+        String endDate = "2021-01-31 00:00:00";
+        bytedanceReportService.checkoutData(token,startDate,endDate);
+    }
+    @Test
     public void etlKuaishouProjectData() {
         CtopOauthToken token = tokenService.getTokenByAccountId(1660666858777607L);
         reportService.getAdvertiserPlanReport(token, DateUtils.parseDate("2021-01-25", "yyyy-MM-dd"), DateUtils.parseDate("2021-01-25", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);

+ 1 - 1
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiSuzaoVideoJob.java

@@ -37,7 +37,7 @@ public class KuaishouAiSuzaoVideoJob {
             Long now = System.currentTimeMillis();
             String startTime = DateUtils.formatDate(new Date(now + timeStart*60*1000),"yyyy-MM-dd HH:mm:ss");
             String endTime = DateUtils.formatDate(new Date(now + timeEnd*60*1000),"yyyy-MM-dd HH:mm:ss");
-            kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime,endTime);
+           // kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startTime,endTime);
         });
     }
 }

+ 0 - 34
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouSuZaoLoadJob.java

@@ -1,34 +0,0 @@
-package cn.com.ctop.job.kuaishou.handler;
-
-import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
-import com.xxl.job.core.context.XxlJobHelper;
-import com.xxl.job.core.handler.annotation.XxlJob;
-import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-@Component
-public class KuaishouSuZaoLoadJob {
-    @Autowired
-    private ICtopOauthTokenService tokenService;
-    @Autowired
-    private IKuaishouInterfaceService kuaishouInterfaceService;
-    static ExecutorService executorService = Executors.newFixedThreadPool(8);
-    @XxlJob("kuaishouSuZao")
-    public void execute() throws Exception {
-        List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
-        String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
-        String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
-        String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
-        tokens.forEach(token -> executorService.submit(() -> kuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startDate, endDate)));
-        XxlJobHelper.log("快手素造数据同步完成");
-    }
-
-
-}

+ 31 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaiShouAppInfoController.java

@@ -56,6 +56,37 @@ public class AiKuaiShouAppInfoController {
     private ICtopOauthTokenService tokenService;
 
 
+    @PostMapping(value = "/getAppDetail")
+    public JSONObject getAppDetail(@RequestBody JSONObject requestJson) {
+        JSONObject returnJson = new JSONObject();
+        try {
+            Long accountId = requestJson.getLong("accountId");
+            if (Check.isNull(accountId)) {
+                throw new Exception("请输入账户");
+            }
+            Long appId = requestJson.getLong("appId");
+            if (Check.isNull(appId)) {
+                throw new Exception("请传入appId");
+            }
+            QueryWrapper<AiKuaiShouAppInfo> queryWrapper = new QueryWrapper<>();
+            queryWrapper.eq("account_id", accountId);
+            queryWrapper.eq("app_id", appId);
+            queryWrapper.last("limit 1");
+            AiKuaiShouAppInfo appInfo = aiKuaiShouAppInfoService.getOne(queryWrapper);
+            if (Check.isNull(appInfo)) {
+                throw new Exception("通过appId未获取到相关信息");
+            }
+            returnJson.put("code", 0);
+            returnJson.put("message", "success");
+            returnJson.put("data", appInfo);
+        } catch (Exception e) {
+            returnJson.put("code", -1);
+            returnJson.put("message", e.getMessage());
+        }
+        return returnJson;
+    }
+
+
     @PostMapping(value = "/importAppExcel")
     public JSONObject importExcel(@RequestParam("file") MultipartFile file,
                                   @RequestParam("accountId") Long accountId,

+ 9 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/AiKuaishouAdvertiserStrategyController.java

@@ -4,10 +4,12 @@ import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAdvertiserStrategy;
 import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaishouAdvertiserStrategyService;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.models.auth.In;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
@@ -72,7 +74,7 @@ public class AiKuaishouAdvertiserStrategyController {
 	private IUserAllocationService allocationService;
 
 	/**
-	  *   添加
+	 *   添加
 	 * @param aiKuaishouAdvertiserStrategy
 	 * @return
 	 */
@@ -81,6 +83,11 @@ public class AiKuaishouAdvertiserStrategyController {
 	public Result<AiKuaishouAdvertiserStrategy> add(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
 		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
 		try {
+			Integer singleAppId = aiKuaishouAdvertiserStrategy.getSingleAppid();
+			if(null!=singleAppId&&singleAppId==1){
+				Integer appId = Integer.parseInt(JSONArray.parseArray(aiKuaishouAdvertiserStrategy.getAppIdArray()).getString(0));
+				aiKuaishouAdvertiserStrategy.setAppId(appId);
+			}
 			aiKuaishouAdvertiserStrategyService.save(aiKuaishouAdvertiserStrategy);
 			result.success("添加成功!");
 		} catch (Exception e) {
@@ -95,8 +102,7 @@ public class AiKuaishouAdvertiserStrategyController {
 	 * @param aiKuaishouAdvertiserStrategy
 	 * @return
 	 */
-	@ApiOperation(value="快手账户策略设置信息表-编辑", notes="快手账户策略设置信息表-编辑")
-	@PutMapping(value = "/edit")
+	@PostMapping(value = "/edit")
 	public Result<AiKuaishouAdvertiserStrategy> edit(@RequestBody AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategy) {
 		Result<AiKuaishouAdvertiserStrategy> result = new Result<>();
 		AiKuaishouAdvertiserStrategy aiKuaishouAdvertiserStrategyEntity = aiKuaishouAdvertiserStrategyService.getById(aiKuaishouAdvertiserStrategy.getId());

+ 8 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouCreativeRefusalController.java

@@ -45,7 +45,7 @@ public class KuaiShouCreativeRefusalController {
     static ExecutorService executorService = Executors.newFixedThreadPool(80);
 
     /**
-     * 创意拒审重提
+     * 创意拒审重提
      *
      * @param requestJson
      * @return
@@ -65,7 +65,8 @@ public class KuaiShouCreativeRefusalController {
             if (Check.isNull(oauthToken)) {
                 throw new Exception("未获取到账户信息");
             }
-            Integer updateType = requestJson.getInteger("updateType"); //  0 更换封面 1 修改广告语
+            //  0 更换封面 1 修改广告语
+            Integer updateType = requestJson.getInteger("updateType");
             if (Check.isNull(updateType)) {
                 throw new Exception("请输入修改类型");
             }
@@ -113,13 +114,14 @@ public class KuaiShouCreativeRefusalController {
                 });
             }
             returnJson.put("code", 0);
-            returnJson.put("message", "异步提交中");
+            returnJson.put("message", "异步任务提交完成,请耐心等待");
+            return returnJson;
         } catch (Exception e) {
             e.printStackTrace();
-            returnJson.put("code", 0);
-            returnJson.put("message", e.getMessage());
+            returnJson.put("code", -1);
+            returnJson.put("message", "服务异常");
+            return returnJson;
         }
-        return returnJson;
     }
 
 

+ 1 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaiShouMaterialControer.java

@@ -63,7 +63,7 @@ public class KuaiShouMaterialControer {
             }
             String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
             iKuaishouInterfaceService.getVideoList(token, nowDate, nowDate);
-            iKuaishouInterfaceService.getSuZaoList(token.getAccessToken(), accountId, 1, nowDate, nowDate);
+          //  iKuaishouInterfaceService.getSuZaoList(token.getAccessToken(), accountId, 1, nowDate, nowDate);
             KuaiShouVideoLastTime videoLastTime = lastTimeService.getById(accountId);
             Date startTime;
             Date endDate = new Date();

+ 17 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/entity/AiKuaishouAdvertiserStrategy.java

@@ -168,6 +168,7 @@ public class AiKuaishouAdvertiserStrategy {
 	private String clickTrackUrl;
 	/**第三方开始播放监测链接*/
 	private String impressionUrl;
+	private Integer generalTrack;
 	/**第三方有效播放监测链接*/
 	private String adPhotoPlayedT3sUrl;
 	/**第三方点击按钮监测链接*/
@@ -184,6 +185,22 @@ public class AiKuaishouAdvertiserStrategy {
 	private Date effectiveTime;
 	/**失效时间*/
 	private Date expiryTime;
+	/**
+	 * 是否开启智能封面
+	 */
+	private Integer smartCover;
+	/**
+	 * 是否开启素材挖掘
+	 */
+	private Integer assetMining;
+	/**
+	 * 是否单应用
+	 */
+	private Integer singleAppid;
+	/**
+	 * 投放中的appId数组
+	 */
+	private String appIdArray;
 
 	@TableField(exist = false)
 	private String authName;

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaiShouAppInfoServiceImpl.java

@@ -239,7 +239,6 @@ public class AiKuaiShouAppInfoServiceImpl extends ServiceImpl<AiKuaiShouAppInfoM
 
     @Override
     public JSONObject uploadAppIconImage(String url, Long accountId, String accessToken) {
-
         JSONObject returnJson = new JSONObject();
         try {
             Map<String, String> headerMap = new HashMap<>();

+ 2 - 4
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/BatchController.java

@@ -155,13 +155,13 @@ public class BatchController {
             };
             thread2.start();
 
-            Thread thread3 = new Thread() {
+          /*  Thread thread3 = new Thread() {
                 @Override
                 public void run() {
                     iKuaishouInterfaceService.getSuZaoList(oauthToken.getAccessToken(), accountId, 1, nowDate, endDate);
                 }
             };
-            thread3.start();
+            thread3.start();*/
 
             Thread thread4 = new Thread() {
                 @Override
@@ -2269,9 +2269,7 @@ public class BatchController {
         try {
             String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
             String startDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -30);
-            String endDate = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, 1);
             syncPullMaterialService.getSyncVideoList(accountId, startDate, nowDate);
-            syncPullMaterialService.getSyncSuZaoList(accountId, startDate, endDate);
             Thread.sleep(5 * 1000L);
             result.setSuccess(true);
             result.setResult(true);

+ 8 - 43
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouVideoGet.java

@@ -32,49 +32,18 @@ public class KuaiShouVideoGet {
     @TableId
     @ApiModelProperty(value = "id")
     private String id;
-    /**
-     * 账户ID
-     */
-    @Excel(name = "账户ID", width = 15)
-    @ApiModelProperty(value = "账户ID")
     private Long accountId;
-    /**
-     * 视频id
-     */
-    @Excel(name = "视频id", width = 15)
-    @ApiModelProperty(value = "视频id")
-    private String photoId;
-    /**
-     * 宽
-     */
-    @Excel(name = "宽", width = 15)
-    @ApiModelProperty(value = "宽")
-    private Integer width;
-    /**
-     * 高
-     */
-    @Excel(name = "高", width = 15)
-    @ApiModelProperty(value = "高")
-    private Integer height;
-    /**
-     * 视频预览链接
-     */
-    @Excel(name = "视频预览链接", width = 15)
-    @ApiModelProperty(value = "视频预览链接")
-    private String url;
-    /**
-     * 视频首帧图片链接
-     */
-    @Excel(name = "视频首帧图片链接", width = 15)
-    @ApiModelProperty(value = "视频首帧图片链接")
     private String coverUrl;
-    private String signature;
-
+    private String photoId;
+    private String photoName;
     private Date statDate;
-
+    private String signature;
+    private String url;
+    private Integer height;
+    private Integer width;
     private Integer materialType;
-
-    private String materialId;
+    private Integer channelType;
+    private Integer status;
     /**
      * 创建时间
      */
@@ -93,8 +62,4 @@ public class KuaiShouVideoGet {
     private Date updateTime;
 
 
-    private Integer channelType;
-    private Integer status;
-    private Long userId;
-    private Integer aiStatus;
 }

+ 8 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouVideoGetMapper.xml

@@ -5,29 +5,34 @@
         replace into ctop_kuaishou_video_get(
         id,
         account_id,
+        status,
         photo_id,
         width,
         height,
         url,
         cover_url,
         material_type,
+        channel_type,
+        stat_date,
         signature,
-        update_time
+        photo_name
         )
         values
         <foreach collection="videos" item="video" separator=",">
             (
             #{video.id},
             #{video.accountId},
+            #{video.status},
             #{video.photoId},
             #{video.width},
             #{video.height},
             #{video.url},
             #{video.coverUrl},
             #{video.materialType},
+            #{video.channelType},
+            #{video.statDate},
             #{video.signature},
-            #{video.updateTime}
-
+            #{video.photoName}
             )
         </foreach>
     </insert>

+ 2 - 8
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaishouInterfaceService.java

@@ -445,14 +445,8 @@ public interface IKuaishouInterfaceService {
     JSONArray getAppSearch(Long accountId, String accessToken, String appName);
 
 
-    /**
-     * 获取素造素材列表
-     *
-     * @param token
-     * @param accountId
-     * @param page
-     */
-    void getSuZaoList(String token, Long accountId, int page, String startDate, String endDate);
+
+   // void getSuZaoList(String token, Long accountId, int page, String startDate, String endDate);
 
     /**
      * 异步获取创意信息

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/ISyncPullMaterialService.java

@@ -3,5 +3,4 @@ package cn.com.ctop.kuaishou.modules.batch.service;
 public interface ISyncPullMaterialService {
     void getSyncVideoList(Long accountId, String startDate, String endDate);
 
-    void getSyncSuZaoList(Long accountId, String nowDate, String endDate);
 }

+ 0 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouVideoGetServiceImpl.java

@@ -125,9 +125,6 @@ public class KuaiShouVideoGetServiceImpl extends ServiceImpl<KuaiShouVideoGetMap
         if (null != accountId && accountId != 0) {
             queryWrapper.eq("account_id", accountId);
         }
-        if (null != aiStatus && aiStatus != 0) {
-            queryWrapper.eq("ai_status", aiStatus);
-        }
         queryWrapper.orderByDesc("stat_date");
         return this.list(queryWrapper);
     }

+ 142 - 100
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouInterfaceServiceImpl.java

@@ -1,7 +1,6 @@
 package cn.com.ctop.kuaishou.modules.batch.service.impl;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.entity.MaterialCutFrame;
 import cn.com.ctop.common.module.entity.OauthConfig;
 import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.enums.MaterialEnum;
@@ -213,43 +212,56 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
                 log.info("快手视频列表信息为空=》accountId:{}", token.getAccountId());
                 return;
             }
-            KuaiShouAdvertiserBaseInfo baseInfo = KuaiShouAdvertiserBaseInfoService.getBaseInfo(token.getAccountId());
-            Long userId = null;
-            if (!Check.isNull(baseInfo)) {
-                userId = Long.valueOf(baseInfo.getUserId());
-            }
+            List<KuaiShouVideoGet> videoGetList = new ArrayList<>();
             for (int i = 0; i < details.size(); i++) {
-                var detailJson = details.getJSONObject(i);
+                JSONObject detailJson = details.getJSONObject(i);
+                if (Check.isNull(detailJson)) {
+                    continue;
+                }
+                KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
+                String photo_id = detailJson.getString("photo_id");
+                videoGet.setId(token.getAccountId() + photo_id);
+                videoGet.setAccountId(token.getAccountId());
+                videoGet.setCoverUrl(detailJson.getString("cover_url"));
+                videoGet.setPhotoId(photo_id);
+                videoGet.setPhotoName(detailJson.getString("photo_name"));
+                videoGet.setStatDate(detailJson.getDate("upload_time"));
+                String signature = detailJson.getString("signature");
+                videoGet.setSignature(signature);
                 Integer source = detailJson.getInteger("source");
                 if (source == 2) {
-                    continue;
+                    videoGet.setChannelType(1);
+                } else {
+                    videoGet.setChannelType(0);
                 }
-                KuaiShouVideoGet byId = kuaiShouVideoGetService.getById(token.getAccountId() + detailJson.getString("photo_id"));
-                if (!Check.isNull(byId)) {
-                    continue;
+                Integer new_status = detailJson.getInteger("new_status");
+                if (new_status == 1) {
+                    videoGet.setStatus(0);
+                } else {
+                    videoGet.setStatus(1);
                 }
-                var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
-                kuaiShouVideoGet.setId(token.getAccountId() + kuaiShouVideoGet.getPhotoId());
-                kuaiShouVideoGet.setAccountId(token.getAccountId());
-                kuaiShouVideoGet.setStatDate(detailJson.getDate("upload_time"));
-                kuaiShouVideoGet.setUpdateTime(new Date());
-                Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
+                videoGet.setUrl(detailJson.getString("url"));
+                Integer width = detailJson.getInteger("width");
+                videoGet.setWidth(width);
+                Integer height = detailJson.getInteger("height");
+                videoGet.setHeight(height);
+                Integer type = MaterialEnum.getTypeBySize(width, height);
                 if (!Check.isNull(type)) {
-                    kuaiShouVideoGet.setMaterialType(type);
+                    videoGet.setMaterialType(type);
                 }
-
-                kuaiShouVideoGet.setUserId(userId);
-                kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
-
+                videoGetList.add(videoGet);
                 Thread thread = new Thread() {
                     @Override
                     public void run() {
-                        videoGetService.getKeyFrame(token.getAccessToken(), token.getAccountId(), kuaiShouVideoGet.getSignature(), kuaiShouVideoGet.getPhotoId());
+                        videoGetService.getKeyFrame(token.getAccessToken(), token.getAccountId(), signature, photo_id);
                     }
                 };
                 thread.start();
-
             }
+            if (!Check.isNull(videoGetList)) {
+                videoGetService.replaceBatch(videoGetList);
+            }
+
             getVideoListByPage(token, startDate, endDate, page + 1);
         } catch (Exception e) {
             e.printStackTrace();
@@ -919,7 +931,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
 
         historyReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
         getVideoList(token, null, null);
-        getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
+        //   getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, null, null);
         String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
         String videoEndDate = DateUtils.addDay(nowDate, -180);
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
@@ -1587,45 +1599,61 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
                 if (code == 0) {
-                    JSONArray dataArray = resultJson.getJSONArray("data");
-                    if (!Check.isNull(dataArray)) {
-                        KuaiShouAdvertiserBaseInfo baseInfo = KuaiShouAdvertiserBaseInfoService.getBaseInfo(accountId);
-                        Long userId = null;
-                        if (!Check.isNull(baseInfo)) {
-                            userId = Long.valueOf(baseInfo.getUserId());
+                    JSONArray details = resultJson.getJSONArray("data");
+                    if (Check.isNull(details)) {
+                        return;
+                    }
+                    List<KuaiShouVideoGet> videoGetList = new ArrayList<>();
+                    for (int i = 0; i < details.size(); i++) {
+                        JSONObject detailJson = details.getJSONObject(i);
+                        if (Check.isNull(detailJson)) {
+                            continue;
                         }
-                        for (int i = 0; i < dataArray.size(); i++) {
-                            JSONObject detailJson = dataArray.getJSONObject(i);
-                            if (!Check.isNull(detailJson)) {
-
-                                KuaiShouVideoGet byId = kuaiShouVideoGetService.getById(accountId + photoId);
-                                if (!Check.isNull(byId)) {
-                                    continue;
-                                }
-                                var kuaiShouVideoGet = JSONObject.toJavaObject(detailJson, KuaiShouVideoGet.class);
-                                kuaiShouVideoGet.setId(accountId + photoId);
-
-                                kuaiShouVideoGet.setAccountId(accountId);
-                                kuaiShouVideoGet.setStatDate(detailJson.getDate("upload_time"));
-                                kuaiShouVideoGet.setUpdateTime(new Date());
-                                Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
-                                if (!Check.isNull(type)) {
-                                    kuaiShouVideoGet.setMaterialType(type);
-                                }
-
-                                kuaiShouVideoGet.setUserId(userId);
-                                kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
-
-                                Thread thread = new Thread() {
-                                    @Override
-                                    public void run() {
-                                        videoGetService.getKeyFrame(accessToken, accountId, kuaiShouVideoGet.getSignature(), kuaiShouVideoGet.getPhotoId());
-                                    }
-                                };
-                                thread.start();
-                            }
+                        KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
+                        String photo_id = detailJson.getString("photo_id");
+                        videoGet.setId(accountId + photo_id);
+                        videoGet.setAccountId(accountId);
+                        videoGet.setCoverUrl(detailJson.getString("cover_url"));
+
+                        videoGet.setPhotoId(photo_id);
+                        videoGet.setPhotoName(detailJson.getString("photo_name"));
+                        videoGet.setStatDate(detailJson.getDate("upload_time"));
+                        String signature = detailJson.getString("signature");
+                        videoGet.setSignature(signature);
+                        Integer source = detailJson.getInteger("source");
+                        if (source == 2) {
+                            videoGet.setChannelType(1);
+                        } else {
+                            videoGet.setChannelType(0);
+                        }
+                        Integer new_status = detailJson.getInteger("new_status");
+                        if (new_status == 1) {
+                            videoGet.setStatus(0);
+                        } else {
+                            videoGet.setStatus(1);
                         }
+                        videoGet.setUrl(detailJson.getString("url"));
+                        Integer width = detailJson.getInteger("width");
+                        videoGet.setWidth(width);
+                        Integer height = detailJson.getInteger("height");
+                        videoGet.setHeight(height);
+                        Integer type = MaterialEnum.getTypeBySize(width, height);
+                        if (!Check.isNull(type)) {
+                            videoGet.setMaterialType(type);
+                        }
+                        videoGetList.add(videoGet);
+                        Thread thread = new Thread() {
+                            @Override
+                            public void run() {
+                                videoGetService.getKeyFrame(accessToken, accountId, signature, photo_id);
+                            }
+                        };
+                        thread.start();
+                    }
+                    if (!Check.isNull(videoGetList)) {
+                        videoGetService.replaceBatch(videoGetList);
                     }
+
                 } else {
                     log.error("获取广告视频信息返回结果异常,advertiserId:{},异常信息:{}", accountId, resultJson);
                 }
@@ -1633,9 +1661,11 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             } else {
                 log.error("获取广告视频信息返回结果异常,advertiserId:{},异常信息:{}", accountId, resultJson);
             }
-        } catch (Exception e) {
+        } catch (
+                Exception e) {
             e.printStackTrace();
         }
+
     }
 
 
@@ -2917,7 +2947,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
     private IKuaiShouVideoGetService videoGetService;
     static ExecutorService suZhaoService = Executors.newFixedThreadPool(15);
 
-    @Override
+   /* @Override
     public void getSuZaoList(String token, Long accountId, int page, String startDate, String endDate) {
         String url = "https://ad.e.kuaishou.com/rest/openapi/v1/ad_creator/video/list";
         Map<String, String> headers = new HashMap<String, String>();
@@ -2933,6 +2963,7 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         }
         String result = HttpUtils.httpPostRequest(url, param, headers);
         JSONObject resultJson = JSONObject.parseObject(result);
+        System.err.println(resultJson);
         if (Check.isNull(resultJson)) {
             return;
         }
@@ -2952,49 +2983,60 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
         if (Check.isNull(details)) {
             return;
         }
-        KuaiShouAdvertiserBaseInfo baseInfo = KuaiShouAdvertiserBaseInfoService.getBaseInfo(accountId);
-        Long userId = null;
-        if (!Check.isNull(baseInfo)) {
-            userId = Long.valueOf(baseInfo.getUserId());
-        }
+
+        List<KuaiShouVideoGet> videoGetList = new ArrayList<>();
         for (int i = 0; i < details.size(); i++) {
-            JSONObject jsonObject = details.getJSONObject(i);
-            if (!Check.isNull(jsonObject)) {
-                KuaiShouVideoGet kuaiShouVideoGet = new KuaiShouVideoGet();
-                Long photo_id = jsonObject.getLong("photo_id");
-                kuaiShouVideoGet.setId(String.valueOf(accountId) + String.valueOf(photo_id));
-                kuaiShouVideoGet.setPhotoId(String.valueOf(photo_id));
-                kuaiShouVideoGet.setUrl(jsonObject.getString("watermark_url"));
-                kuaiShouVideoGet.setWidth(jsonObject.getInteger("width"));
-                kuaiShouVideoGet.setHeight(jsonObject.getInteger("height"));
-                kuaiShouVideoGet.setCoverUrl(jsonObject.getString("cover_url"));
-                kuaiShouVideoGet.setAccountId(accountId);
-                String md5 = jsonObject.getString("md5");
-                kuaiShouVideoGet.setSignature(md5);
-                kuaiShouVideoGet.setStatDate(jsonObject.getDate("sync_date"));
-                kuaiShouVideoGet.setChannelType(1);
-                kuaiShouVideoGet.setUserId(userId);
-                kuaiShouVideoGet.setMaterialId(jsonObject.getString("material_id"));
-                Integer type = MaterialEnum.getTypeBySize(kuaiShouVideoGet.getWidth(), kuaiShouVideoGet.getHeight());
-                if (!Check.isNull(type)) {
-                    kuaiShouVideoGet.setMaterialType(type);
-                }
-                kuaiShouVideoGetService.saveOrUpdate(kuaiShouVideoGet);
-                suZhaoService.submit(new Runnable() {
-                    @Override
-                    public void run() {
-                        List<MaterialCutFrame> cutFrames = cutFrameService.getListByVideoSignature(md5);
-                        if (null == cutFrames || cutFrames.isEmpty()) {
-                            videoGetService.getKeyFrame(token, accountId, md5, String.valueOf(photo_id));
-                        }
-                    }
-                });
+            JSONObject detailJson = details.getJSONObject(i);
+            if (Check.isNull(detailJson)) {
+                continue;
+            }
+            KuaiShouVideoGet videoGet = new KuaiShouVideoGet();
+            String photo_id = detailJson.getString("photo_id");
+            videoGet.setId(accountId + photo_id);
+            videoGet.setAccountId(accountId);
+            videoGet.setCoverUrl(detailJson.getString("cover_url"));
+            videoGet.setPhotoId(photo_id);
+            videoGet.setPhotoName(detailJson.getString("photo_name"));
+            videoGet.setStatDate(detailJson.getDate("upload_time"));
+            String signature = detailJson.getString("signature");
+            videoGet.setSignature(signature);
+            Integer source = detailJson.getInteger("source");
+            if (source == 2) {
+                videoGet.setChannelType(1);
+            } else {
+                videoGet.setChannelType(0);
             }
+            Integer new_status = detailJson.getInteger("new_status");
+            if (new_status == 1) {
+                videoGet.setStatus(0);
+            } else {
+                videoGet.setStatus(1);
+            }
+            videoGet.setUrl(detailJson.getString("url"));
+            Integer width = detailJson.getInteger("width");
+            videoGet.setWidth(width);
+            Integer height = detailJson.getInteger("height");
+            videoGet.setHeight(height);
+            Integer type = MaterialEnum.getTypeBySize(width, height);
+            if (!Check.isNull(type)) {
+                videoGet.setMaterialType(type);
+            }
+            videoGetList.add(videoGet);
+            Thread thread = new Thread() {
+                @Override
+                public void run() {
+                    videoGetService.getKeyFrame(token, accountId, signature, photo_id);
+                }
+            };
+            thread.start();
+        }
+        if (!Check.isNull(videoGetList)) {
+            videoGetService.replaceBatch(videoGetList);
         }
 
         getSuZaoList(token, accountId, page + 1, startDate, endDate);
 
-    }
+    }*/
 
     @Autowired
     private IMaterialCutFrameService cutFrameService;

+ 0 - 28
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/SyncPullMaterialServiceImpl.java

@@ -58,33 +58,5 @@ public class SyncPullMaterialServiceImpl implements ISyncPullMaterialService {
         }
     }
 
-    /**
-     * 获取素造素材
-     *
-     * @param accountId
-     * @param startDate
-     * @param endDate
-     */
-    @Override
-    public void getSyncSuZaoList(Long accountId, String startDate, String endDate) {
-
-        KuaiShouAdvertiserBaseInfo baseInfo = KuaiShouAdvertiserBaseInfoService.getBaseInfo(accountId);
-        if (!Check.isNull(baseInfo)) {
-            List<KuaiShouAdvertiserBaseInfo> baseInfoList = KuaiShouAdvertiserBaseInfoService.getAccountIdList(baseInfo.getUserId());
-            if (!Check.isNull(baseInfoList)) {
-                for (KuaiShouAdvertiserBaseInfo advertiserBaseInfo : baseInfoList) {
-                    CtopOauthToken token = oauthTokenService.getTokenByAccountId(advertiserBaseInfo.getAccountId());
-                    if (!Check.isNull(token)) {
-                        suZhaoExecutorService.submit(new Runnable() {
-                            @Override
-                            public void run() {
-                                iKuaishouInterfaceService.getSuZaoList(token.getAccessToken(), token.getAccountId(), 1, startDate, endDate);
-                            }
-                        });
-                    }
-                }
-            }
-        }
 
-    }
 }

+ 70 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/entity/BytedanceMatReportTaskCheckInfo.java

@@ -0,0 +1,70 @@
+package cn.com.ctop.toutiao.modules.report.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.TableField;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.jeecgframework.poi.excel.annotation.Excel;
+
+/**
+ * 报表数据核验信息
+ * @author jeecg-boot
+ * @date   2021-02-02
+ * @version V1.0
+ */
+@Data
+@TableName("ctop_bytedance_mat_report_task_check_info")
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="ctop_bytedance_mat_report_task_check_info对象", description="报表数据核验信息")
+public class BytedanceMatReportTaskCheckInfo {
+
+	/**id*/
+	@TableId(type = IdType.AUTO)
+    @ApiModelProperty(value = "id")
+	private Long id;
+	/**accountId*/
+	@Excel(name = "accountId", width = 15)
+    @ApiModelProperty(value = "accountId")
+	private Long accountId;
+	/**stateDate*/
+	@Excel(name = "stateDate", width = 15)
+    @ApiModelProperty(value = "stateDate")
+	private String stateDate;
+	/**accountCost*/
+	@Excel(name = "accountCost", width = 15)
+    @ApiModelProperty(value = "accountCost")
+	private BigDecimal accountCost;
+	/**videoCost*/
+	@Excel(name = "videoCost", width = 15)
+    @ApiModelProperty(value = "videoCost")
+	private BigDecimal videoCost;
+	/**imageCost*/
+	@Excel(name = "imageCost", width = 15)
+    @ApiModelProperty(value = "imageCost")
+	private BigDecimal imageCost;
+	/**status*/
+	@Excel(name = "status", width = 15)
+    @ApiModelProperty(value = "status")
+	private Integer status;
+	/**createTime*/
+    @ApiModelProperty(value = "createTime")
+	private Date createTime;
+	/**updateTime*/
+    @ApiModelProperty(value = "updateTime")
+	private Date updateTime;
+	/**czCost*/
+	@Excel(name = "czCost", width = 15)
+    @ApiModelProperty(value = "czCost")
+	private BigDecimal czCost;
+}

+ 18 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/BytedanceMatReportTaskCheckInfoMapper.java

@@ -0,0 +1,18 @@
+package cn.com.ctop.toutiao.modules.report.mapper;
+
+import cn.com.ctop.toutiao.modules.report.entity.BytedanceMatReportTaskCheckInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 报表数据核验信息
+ * @author: jeecg-boot
+ * @date:   2021-02-02
+ * @cersion: V1.0
+ */
+public interface BytedanceMatReportTaskCheckInfoMapper extends BaseMapper<BytedanceMatReportTaskCheckInfo> {
+
+    List<BytedanceMatReportTaskCheckInfo> getByParams(@Param(value = "accountId") Long accountId, @Param(value = "startDate")String startDate, @Param(value = "endDate") String endDate);
+}

+ 29 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/mapper/xml/BytedanceMatReportTaskCheckInfoMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.com.ctop.toutiao.modules.report.mapper.BytedanceMatReportTaskCheckInfoMapper">
+
+    <select id="getByParams"
+            resultType="cn.com.ctop.toutiao.modules.report.entity.BytedanceMatReportTaskCheckInfo">
+        select a.*, a.accountCost - a.videoCost - a.imageCost as 'cc'
+        from (select account.stat_datetime,
+        account.advertiser_id,
+        sum(account.cost)                                as 'accountCost',
+        (select sum(video.cost)
+        from ctop_bytedance_report_material_daily video
+        where video.stat_datetime = left(account.stat_datetime, 10)
+        and video.account_id = account.advertiser_id) as 'videoCost',
+        (select (case
+        when sum(image.cost) is null
+        then 0
+        else sum(image.cost) end)
+        from ctop_bytedance_report_image_daily image
+        where image.stat_datetime = left(account.stat_datetime, 10)
+        and image.account_id = account.advertiser_id) as 'imageCost'
+        from ctop_bytedance_report_advertiser_daily account
+        where account.stat_datetime &gt;= #{startDate}
+        and account.stat_datetime &lt;= #{endDate}
+        AND account.advertiser_id = #{accountId}
+        group by account.stat_datetime
+        order by account.stat_datetime) a;
+    </select>
+</mapper>

+ 5 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceInterfaceService.java

@@ -2,6 +2,8 @@ package cn.com.ctop.toutiao.modules.report.service;
 
 import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportPlayableRetry;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 
 import java.util.List;
 
@@ -16,4 +18,7 @@ public interface IBytedanceInterfaceService {
 
     int bytedancePlayableReportRetry(Integer type, CtopOauthToken token, String startDate, String endDate);
 
+    JSONObject createAsyncTask(CtopOauthToken token, String startDate, String endDate, JSONArray groupByArray);
+
+    JSONObject getAsyncTask(CtopOauthToken token, JSONArray taskIds);
 }

+ 14 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceMatReportTaskCheckInfoService.java

@@ -0,0 +1,14 @@
+package cn.com.ctop.toutiao.modules.report.service;
+
+import cn.com.ctop.toutiao.modules.report.entity.BytedanceMatReportTaskCheckInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * @Description: 报表数据核验信息
+ * @Author: jeecg-boot
+ * @Date:   2021-02-02
+ * @Version: V1.0
+ */
+public interface IBytedanceMatReportTaskCheckInfoService extends IService<BytedanceMatReportTaskCheckInfo> {
+
+}

+ 3 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/IBytedanceReportService.java

@@ -41,4 +41,7 @@ public interface IBytedanceReportService {
     int bytedanceVideoMaterialReport(CtopOauthToken token, String startDate, String endDate);
 
     void bytedanceMaterialReportV2(BytedanceAccountReportTaskRecord record);
+
+    void checkoutData(CtopOauthToken token, String startDate, String endDate);
+
 }

+ 61 - 14
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceInterfaceServiceImpl.java

@@ -17,11 +17,22 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Primary;
 import org.springframework.stereotype.Service;
 
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -44,19 +55,6 @@ public class BytedanceInterfaceServiceImpl implements IBytedanceInterfaceService
 
     @Override
     public void searchLog(Long accountId, CtopOauthToken token, Integer operationTarget, String startDate, String endDate){
-
-        //int campaignCount = byteDanceCampaignService.count(parameterQueryWrapper);
-        //int campaignPageSize = 20;
-        //int campaignPage = 1;
-        //
-        //Integer campaignTotalPage = (campaignCount - 1) / campaignPageSize + 1;
-        //if (campaignPage < campaignTotalPage) {
-        //    QueryWrapper<ByteDanceCampaign> parameterQueryWrapper2 = new QueryWrapper<>();
-        //    parameterQueryWrapper2.eq("account_id", accountId);
-        //    parameterQueryWrapper2.last("limit" +  (campaignPage-1) +  "," + campaignPageSize);
-        //    parameterQueryWrapper2.select("id");
-        //
-        //}
         int pageNum = 1;
         int pageSize = 20;
         String startTime = startDate + " 00:00:00";
@@ -163,7 +161,7 @@ public class BytedanceInterfaceServiceImpl implements IBytedanceInterfaceService
                 }
 
                 //按类型入库
-                if (records != null && records.size() != 0) {
+                if (records.size() != 0) {
                     insertLog(operationType, records);
                 }
 
@@ -332,6 +330,55 @@ public class BytedanceInterfaceServiceImpl implements IBytedanceInterfaceService
         return returnCode;
     }
 
+    @Override
+    public JSONObject createAsyncTask(CtopOauthToken token, String startDate, String endDate, JSONArray groupByArray) {
+        // 请求地址
+        String url = "https://ad.toutiao.com/open_api/2/async_task/create/";
+        // 请求参数
+        JSONObject filtering= new JSONObject();
+        filtering.put("start_date",startDate);
+        filtering.put("end_date",endDate);
+        filtering.put("group_by",groupByArray);
+        JSONObject params = new JSONObject();
+        params.put("advertiser_id", token.getAccountId());
+        params.put("task_name", "test");
+        params.put("task_type", "REPORT");
+        params.put("task_params", filtering);
+        return HttpUtils.bytedancePostRequest(token.getAccessToken(),url,params);
+    }
+
+    @Override
+    public JSONObject getAsyncTask(CtopOauthToken token, JSONArray taskIds) {
+        // 请求地址
+        String url = "https://ad.toutiao.com/open_api/2/async_task/get/";
+        // 请求参数
+        JSONObject filtering = new JSONObject();
+        filtering.put("task_ids",taskIds);
+
+        JSONObject params = new JSONObject();
+        params.put("advertiser_id", token.getAccountId());
+        params.put("filtering", filtering);
+        return HttpUtils.bytedanceGetRequest(token.getAccessToken(),url,params);
+    }
+
+    public JSONObject dowanloadAsyncTask(CtopOauthToken  token,Long taskId) {
+        // 请求地址
+        String url = "https://ad.toutiao.com/open_api/2/async_task/download/";
+        // 请求参数
+        JSONObject filtering = new JSONObject();
+        filtering.put("start_date", "2019-08-08");
+        filtering.put("end_date","2019-08-08");
+        filtering.put("group_by",new String[]{"STAT_GROUP_BY_CAMPAIGN_ID"});
+
+        JSONObject params = new JSONObject();
+        params.put("advertiser_id", token.getAccountId());
+        params.put("task_id", taskId);
+        return HttpUtils.bytedanceGetRequest(token.getAccessToken(),url,params);
+    }
+
+
+
+
 
 
 

+ 18 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceMatReportTaskCheckInfoServiceImpl.java

@@ -0,0 +1,18 @@
+package cn.com.ctop.toutiao.modules.report.service.impl;
+
+import cn.com.ctop.toutiao.modules.report.entity.BytedanceMatReportTaskCheckInfo;
+import cn.com.ctop.toutiao.modules.report.mapper.BytedanceMatReportTaskCheckInfoMapper;
+import cn.com.ctop.toutiao.modules.report.service.IBytedanceMatReportTaskCheckInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * 报表数据核验信息
+ * @author jeecg-boot
+ * @date   2021-02-02
+ * @version V1.0
+ */
+@Service
+public class BytedanceMatReportTaskCheckInfoServiceImpl extends ServiceImpl<BytedanceMatReportTaskCheckInfoMapper, BytedanceMatReportTaskCheckInfo> implements IBytedanceMatReportTaskCheckInfoService {
+
+}

+ 12 - 4
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceReportServiceImpl.java

@@ -4,10 +4,8 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
 import cn.com.ctop.common.module.utils.Check;
 import cn.com.ctop.common.module.utils.HttpUtils;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceAccountReportTaskRecord;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialDaily;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportMaterialRetry;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceReportVideoMaterialDaily;
+import cn.com.ctop.toutiao.modules.report.entity.*;
+import cn.com.ctop.toutiao.modules.report.mapper.BytedanceMatReportTaskCheckInfoMapper;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMapper;
 import cn.com.ctop.toutiao.modules.report.mapper.BytedanceReportMaterialDailyMapper;
 import cn.com.ctop.toutiao.modules.report.service.IBytedanceAccountReportTaskRecordService;
@@ -20,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.util.*;
@@ -546,6 +545,14 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
         }
         log.info("头条素材报表结束 当前accountId为:{}  {}~{}" , accountId, record.getStartDate(),record.getEndDate());
     }
+    @Resource
+    private BytedanceMatReportTaskCheckInfoMapper checkInfoMapper;
+
+    @Override
+    public void checkoutData(CtopOauthToken token, String startDate, String endDate) {
+        //1:检查
+        List<BytedanceMatReportTaskCheckInfo>checkInfoList = checkInfoMapper.getByParams(token.getAccountId(),startDate,endDate);
+    }
 
     private int bytedanceMaterialReportByPage(Integer page, Integer pageSize, CtopOauthToken token, Long accountId, String startDate, String endDate) {
         // 请求地址
@@ -562,6 +569,7 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
             }
         };
         JSONObject json = HttpUtils.bytedanceGetRequest(token.getAccessToken(), url, JSONObject.parseObject(JSONObject.toJSONString(data)));
+        System.out.println(json);
         if (json == null) {
             log.error("返回为空,请求有误:" + JSONObject.toJSONString(data));
             return -2;

+ 1 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

@@ -86,6 +86,7 @@ public class ReportServiceImpl implements IReportService {
         config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
         JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(conditions, config));
         JSONObject getObject = getAdvertiserStat(token, jsonObject);
+        System.out.println(getObject);
         if(null == getObject){
             XxlJobHelper.log("头条广告主数据获取异常");
             return;