|
@@ -5,6 +5,7 @@ import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -13,6 +14,7 @@ import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
|
@Component
|
|
|
+@Slf4j
|
|
|
public class BytedancePlanLoadJob {
|
|
|
@Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
@@ -27,6 +29,7 @@ public class BytedancePlanLoadJob {
|
|
|
@XxlJob("bytedancePlanLoadJob")
|
|
|
public void execute() throws Exception {
|
|
|
//1:查询当日数据
|
|
|
+ log.info("============获取头条全量计划=================");
|
|
|
List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
|
|
|
tokens.forEach(token -> executorService.submit(() -> advertiserDataService.getAdvertiserPlan(token, "", null, null)));
|
|
|
XxlJobHelper.log("头条全量计划数据获取完成");
|