|
@@ -0,0 +1,27 @@
|
|
|
|
+package cn.com.ctop.job.bytedance.handler;
|
|
|
|
+
|
|
|
|
+import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
|
|
+import cn.com.ctop.toutiao.modules.report.service.IBytedanceVideoEtlInfoService;
|
|
|
|
+import com.xxl.job.core.context.XxlJobHelper;
|
|
|
|
+import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
|
+import org.jeecg.common.util.DateUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
|
+
|
|
|
|
+import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
|
|
+@Component
|
|
|
|
+public class BytedanceEtlVideoJob {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IBytedanceVideoEtlInfoService bytedanceVideoEtlInfoService;
|
|
|
|
+ @XxlJob("bytedanceEtlVideoJob")
|
|
|
|
+ public void execute() throws Exception {
|
|
|
|
+ Date startDate = DateUtils.addDay(new Date(),-2);
|
|
|
|
+ for(int i=0;i<=2;i++){
|
|
|
|
+ Date getDate = DateUtils.addDay(startDate,i);
|
|
|
|
+ bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|