Browse Source

加入测试接口

yumeng 5 years ago
parent
commit
21c1320b9f

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

@@ -191,6 +191,34 @@ public class TestController {
         thread.start();
     }
 
+
+    @GetMapping(value = "/getPlanAndGroupByAccount")
+    public void getPlanAndGroupByAccount(Long accountId) {
+        QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
+        oauthTokenQueryWrapper.eq("media_id", 2);
+        oauthTokenQueryWrapper.eq("account_id", accountId);
+        oauthTokenQueryWrapper.last("limit 1");
+        CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
+        executorService.submit(new Runnable() {
+            @Override
+            public void run() {
+                try {
+
+                    kuaishouInterfaceService.getCampaignList(token, null, null);
+                    //1:获取全量广告组数据
+                    kuaishouInterfaceService.getGroupList(token, null, null);
+
+                    Thread.sleep(1 * 200);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        });
+
+
+    }
+
+
     @GetMapping(value = "/gerCreativeByAccount")
     public void gerCreative(Long accountId) {
         QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
@@ -203,12 +231,12 @@ public class TestController {
             public void run() {
                 try {
                     System.err.println("获取创意,accountId:" + token.getAccountId());
+                    kuaishouInterfaceService.getCampaignList(token, null, null);
+                    //1:获取全量广告组数据
+                    kuaishouInterfaceService.getGroupList(token, null, null);
                     kuaishouInterfaceService.getCreativeList(token, null, null);
-                    //  kuaishouInterfaceService.getVideoList2(token, null, null,1);
-                    //3: 获取图片信息数据
-                    // kuaishouInterfaceService.getImageList2(token, null, null,1);
+
                     Thread.sleep(1 * 200);
-                    //  kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
                 } catch (Exception e) {
                     e.printStackTrace();
                 }