Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

syh 5 anni fa
parent
commit
6c7c30f3c3

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

@@ -90,7 +90,6 @@ public class TestController {
     private IKuaishouInterfaceService kuaishouInterfaceService;
 
 
-
     @GetMapping(value = "/getHistoryData")
     public String getHistoryData() {
         Result<String> result = new Result<String>();
@@ -105,12 +104,12 @@ public class TestController {
 
             //List<CtopOauthToken> ctopOauthTokens = oauthTokenMapper.selectList(tokenQueryWrapper);
             //if (!Check.isNull(ctopOauthTokens)) {
-                //for (CtopOauthToken token : ctopOauthTokens) {
-                    //if ("3768019".equals(token.getAccountId())) {
-                        historyReportTaskService.createTask(3768019L, "0fb5f7dadd26b265979b1a8956950008", startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
+            //for (CtopOauthToken token : ctopOauthTokens) {
+            //if ("3768019".equals(token.getAccountId())) {
+            historyReportTaskService.createTask(3768019L, "0fb5f7dadd26b265979b1a8956950008", startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
 
-                    //}
-                //}
+            //}
+            //}
             //}
         } catch (Exception e) {
             e.printStackTrace();
@@ -403,6 +402,26 @@ public class TestController {
     }
 
 
+    @GetMapping(value = "/getVideo")
+    public void getVideo(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);
+
+        try {
+            System.err.println("获取视频,accountId:" + token.getAccountId());
+            kuaishouInterfaceService.getVideoList(token, null, null);
+            System.err.println("获取视频结束,accountId:" + token.getAccountId());
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+
+    }
+
+
     @GetMapping(value = "/gerCreativeReportByAccount")
     public void gerCreativeReportByAccount(Long accountId, String startDateStr, String endDateStr, QueryWrapper<CtopOauthToken> account_id) {
         Thread thread = new Thread() {