|
@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.util.DateUtils;
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
|
+import org.jeecg.modules.ctop.job.KuaishouDailyAccountReportLoadJob;
|
|
import org.jeecg.modules.ctop.service.ICleanMaterialService;
|
|
import org.jeecg.modules.ctop.service.ICleanMaterialService;
|
|
import org.jeecg.modules.ctop.service.ICreateInternalService;
|
|
import org.jeecg.modules.ctop.service.ICreateInternalService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -851,5 +852,35 @@ public class TestController {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @GetMapping(value = "/KuaishouDailyAccountReportLoadJob")
|
|
|
|
+ public void KuaishouDailyAccountReportLoadJob(){
|
|
|
|
+ Date getDate = DateUtils.addDay(new Date(), -2);
|
|
|
|
+ //1:查询当日数据
|
|
|
|
+ List<CtopOauthToken> tokens = tokenService.selectKuaiShouToken();
|
|
|
|
+ if (null == tokens || tokens.size() <= 0) {
|
|
|
|
+ log.info("定时获取快手数据异常:未获取到可用的token");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ executorService = Executors.newFixedThreadPool(3);
|
|
|
|
+ tokens.forEach(token -> {
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
+ @Override
|
|
|
|
+ public void run() {
|
|
|
|
+ //1: 获取广告主信息数据
|
|
|
|
+ kuaishouInterfaceService.getAdvertiserReportDaily(token, getDate, getDate);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|