package cn.com.ctop.kuaishou.modules.report.job;

import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
import org.jeecg.common.util.DateUtils;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;

public class KuaishouReportAgentJob implements Job {

    @Autowired
    private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-1));
        kuaishouReportDailyAgentService.getReport(currentDate,DateUtils.getNowDate("yyyy-MM-dd"));
    }
}
