package cn.com.ctop.job.kuaishou.handler;

import cn.com.ctop.kuaishou.modules.report.service.IKuaishouVideoEtlInfoService;
import cn.com.ctop.toutiao.modules.report.service.IBytedanceVideoEtlInfoService;
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;

@Component
public class KuaishouEtlVideoJob {
    @Autowired
    private IKuaishouVideoEtlInfoService kuaishouVideoEtlInfoService;
    @XxlJob("kuaishouEtlVideoJob")
    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);
            kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
        }
    }
}
