Sfoglia il codice sorgente

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

zhaoxian 4 anni fa
parent
commit
b2fb90c3a4

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

@@ -499,6 +499,7 @@ public class MaterialInfoController {
                 url = KuaishouInterfaceConstant.HTTPS_PREFIX + url;
             }
             materialInfo.setUrl(url);
+            materialInfo.setCreateTime(new Date());
             MaterialCutFrame cutFrame = materialCutFrameService.getCutFrameByCode(materialInfo.getCode());
             if (Check.isNull(cutFrame)) {
                 String videoUrl = URLDecoder.decode(url).replace("https://media-1301855440.cos.ap-chongqing.myqcloud.com/", "");

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

@@ -10,6 +10,7 @@ import cn.com.ctop.crawler.modules.core.service.CrawlerDouyinMusicTaskService;
 import cn.com.ctop.crawler.modules.douyin.service.DouyinMusicService;
 import cn.com.ctop.kuaishou.modules.batch.service.*;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
+import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
 import cn.com.ctop.toutiao.modules.report.service.*;
@@ -86,6 +87,14 @@ public class TestController {
     static ExecutorService executorService = Executors.newFixedThreadPool(15);
     static ExecutorService videoService = Executors.newFixedThreadPool(5);
     static ExecutorService suzhaoService = Executors.newFixedThreadPool(10);
+    @Autowired
+    private IKuaiShouDailyAgentService dailyAgentService;
+
+
+    @GetMapping(value = "/agentReport")
+    public void agentReport(String startDate, String endDate) {
+        dailyAgentService.getAgentReportByPage(startDate, endDate);
+    }
 
 
     @GetMapping(value = "/dailyReport")
@@ -100,19 +109,19 @@ public class TestController {
     }
 
     @GetMapping("getKuaishouPlanHourlyReport")
-    public Map<String,Object> getKuaishouPlanHourlyReport(String params){
+    public Map<String, Object> getKuaishouPlanHourlyReport(String params) {
         Long start = System.currentTimeMillis();
-        Map<String,Object>result = new HashMap<>();
-        if(null == params||params.trim().equals("")){
-            ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
-            result.put("message","COMMON_PARAM_ERROR");
+        Map<String, Object> result = new HashMap<>();
+        if (null == params || params.trim().equals("")) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            result.put("message", "COMMON_PARAM_ERROR");
             return result;
         }
         Long accountId = Long.parseLong(params);
         CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
-        if(null == token){
-            ResultMapUtils.setResultMap(result,StatusCode.COMMON_PARAM_ERROR);
-            result.put("message","TOKEN_IS_NULL");
+        if (null == token) {
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_PARAM_ERROR);
+            result.put("message", "TOKEN_IS_NULL");
             return result;
         }
         Date getDate = new Date();
@@ -125,22 +134,20 @@ public class TestController {
         Date finalGetDate = getDate;
         try {
             kuaishouInterfaceService.getAdvertiserCampaignReportHourly(token, finalGetDate, finalGetDate);
-            ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
-            result.put("message","SUCCESS");
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
+            result.put("message", "SUCCESS");
             long end = System.currentTimeMillis();
-            log.info("执行时长:{}毫秒",end-start);
+            log.info("执行时长:{}毫秒", end - start);
             return result;
-        }catch (Exception e){
+        } catch (Exception e) {
             e.printStackTrace();
-            ResultMapUtils.setResultMap(result,StatusCode.COMMON_SERVER_ERROR);
-            result.put("message","COMMON_SERVER_ERROR");
+            ResultMapUtils.setResultMap(result, StatusCode.COMMON_SERVER_ERROR);
+            result.put("message", "COMMON_SERVER_ERROR");
             return result;
         }
     }
 
 
-
-
     @GetMapping(value = "/getMd5")
     public void getMd5() {
         kuaiShouHistoryReportTaskService.getMd5(null, null);
@@ -1199,13 +1206,15 @@ public class TestController {
 
         return result;
     }
+
     @Autowired
     private IKuaiShouCommentService kuaiShouCommentService;
+
     @GetMapping("deleteComment")
-    public Map<String,Object>deleteComment(Long accountId){
-        Map<String,Object>result = new HashMap<>();
+    public Map<String, Object> deleteComment(Long accountId) {
+        Map<String, Object> result = new HashMap<>();
         kuaiShouCommentService.shieldComment(accountId);
-        ResultMapUtils.setResultMap(result,StatusCode.COMMON_SUCCESS);
+        ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
         return result;
     }
 }