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