yumeng пре 5 година
родитељ
комит
66418c4bef

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

@@ -136,7 +136,7 @@ public class TestController {
                 @Override
                 public void run() {
                     try {
-                        System.err.println("获取创意,accountId:" +token.getAccountId() );
+                        System.err.println("获取创意,accountId:" + token.getAccountId());
                         kuaishouInterfaceService.getCreativeList(token, null, null);
                         //  kuaishouInterfaceService.getVideoList2(token, null, null,1);
                         //3: 获取图片信息数据
@@ -182,4 +182,30 @@ public class TestController {
         };
         thread.start();
     }
+
+
+    @GetMapping(value = "/gerCreativeReportByAccount")
+    public void gerCreativeReportByAccount(Long accountId, String startDateStr, String endDateStr, QueryWrapper<CtopOauthToken> account_id) {
+        Thread thread = new Thread() {
+            @SneakyThrows
+            @Override
+            public void run() {
+                SimpleDateFormat sim = new SimpleDateFormat("yyyy-MM-dd");
+                Date startDate = sim.parse(startDateStr);
+                Date endDate = sim.parse(endDateStr);
+                //1:查询当日数据
+                //executorService = Executors.newFixedThreadPool(3);
+                QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
+                oauthTokenQueryWrapper.eq("media_id", 2);
+                oauthTokenQueryWrapper.eq("account_id", accountId);
+                CtopOauthToken ctopOauthToken = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+                System.err.println("创意报表accountId:" + ctopOauthToken.getAccountId());
+                kuaishouInterfaceService.getAdvertiserCreativeReportDaily(ctopOauthToken, startDate, endDate);
+
+
+            }
+        };
+        thread.start();
+    }
+
 }