|
@@ -3,6 +3,8 @@ package cn.com.ctop.job.bytedance.handler;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
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.IByteDanceVideoInfoService;
|
|
|
|
+import cn.com.ctop.toutiao.modules.material.service.IBytedanceImageInfoService;
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -22,6 +24,10 @@ public class BytedanceMaterialsLoadJob {
|
|
static CountDownLatch countDownLatch = null;
|
|
static CountDownLatch countDownLatch = null;
|
|
@Autowired
|
|
@Autowired
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IByteDanceVideoInfoService videoInfoService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IBytedanceImageInfoService imageInfoService;
|
|
|
|
|
|
@XxlJob("bytedanceMaterialsLoadJob")
|
|
@XxlJob("bytedanceMaterialsLoadJob")
|
|
public void execute() throws Exception{
|
|
public void execute() throws Exception{
|
|
@@ -47,6 +53,8 @@ public class BytedanceMaterialsLoadJob {
|
|
} catch (InterruptedException e) {
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
+ videoInfoService.updateMaterialType();
|
|
|
|
+ imageInfoService.updateType();
|
|
XxlJobHelper.log("物料数据同步完成");
|
|
XxlJobHelper.log("物料数据同步完成");
|
|
}
|
|
}
|
|
}
|
|
}
|