|
@@ -1,5 +1,7 @@
|
|
package cn.com.ctop.job.bytedance.handler;
|
|
package cn.com.ctop.job.bytedance.handler;
|
|
|
|
|
|
|
|
+import cn.com.ctop.common.module.entity.UserAllocation;
|
|
|
|
+import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
|
|
import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceVideoEtlInfoService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceVideoEtlInfoService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IEtlBytedanceReportVideoDailyService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IEtlBytedanceReportVideoDailyService;
|
|
@@ -8,7 +10,9 @@ import org.jeecg.common.util.DateUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Component
|
|
@Component
|
|
public class BytedanceEtlVideoJob {
|
|
public class BytedanceEtlVideoJob {
|
|
@@ -19,6 +23,10 @@ public class BytedanceEtlVideoJob {
|
|
@Autowired
|
|
@Autowired
|
|
private IEtlBytedanceReportVideoDailyService etlBytedanceReportVideoDailyService;
|
|
private IEtlBytedanceReportVideoDailyService etlBytedanceReportVideoDailyService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private IUserAllocationService userAllocationService;
|
|
|
|
+
|
|
|
|
+
|
|
@XxlJob("bytedanceEtlVideoJob")
|
|
@XxlJob("bytedanceEtlVideoJob")
|
|
public void execute() throws Exception {
|
|
public void execute() throws Exception {
|
|
Date startDate = DateUtils.addDay(new Date(),-2);
|
|
Date startDate = DateUtils.addDay(new Date(),-2);
|
|
@@ -45,7 +53,12 @@ public class BytedanceEtlVideoJob {
|
|
*/
|
|
*/
|
|
@XxlJob("updBytedanceVideoJob")
|
|
@XxlJob("updBytedanceVideoJob")
|
|
public void updBytedanceVideoJob() throws Exception {
|
|
public void updBytedanceVideoJob() throws Exception {
|
|
- etlBytedanceReportVideoDailyService.updBytedanceVideo();
|
|
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
+ String timeStr = sdf.format(new Date());
|
|
|
|
+ List<UserAllocation> userAllocationList = userAllocationService.list();
|
|
|
|
+ for (UserAllocation userAllocation : userAllocationList) {
|
|
|
|
+ etlBytedanceReportVideoDailyService.updBytedanceVideo(userAllocation.getAccountId(),userAllocation.getProjectId(),timeStr);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|