|
@@ -15,6 +15,7 @@ import cn.com.ctop.common.module.utils.ResultMapUtils;
|
|
|
import cn.com.ctop.common.module.utils.StatusCode;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouCampaign;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouCampaignService;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouReportDailyCreativeMapper;
|
|
@@ -38,6 +39,8 @@ import java.util.concurrent.CountDownLatch;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
+import static org.jeecg.common.util.DateUtils.getAnotherDay;
|
|
|
+
|
|
|
/**
|
|
|
* @author jeecg-boot
|
|
|
*/
|
|
@@ -164,6 +167,26 @@ public class TestController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("checkFile")
|
|
|
+ public Map<String, Object> checkFile() {
|
|
|
+ String nowDate = DateUtils.getDate("yyyy-MM-dd");
|
|
|
+ String statDate = getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ // 查询快手token
|
|
|
+ List<CtopOauthToken> tokens = tokenService.getTokenListByType(CtopAdConstant.PLATFORM_TYPE_KUAISHOU);
|
|
|
+ if (null == tokens || tokens.size() <= 0) {
|
|
|
+ log.info("定时获取快手数据异常:未获取到可用的token");
|
|
|
+ }
|
|
|
+ for (CtopOauthToken token : tokens) {
|
|
|
+ dailyReportTaskService.getTaskList(token.getAccountId(), token.getAccessToken(), statDate);
|
|
|
+ }
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouDailyReportTaskService dailyReportTaskService;
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
|
private IKuaiShouCampaignService campaignService;
|