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

import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
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 static org.jeecg.common.util.DateUtils.getAnotherDay;

/**
 * 检查前一天md5为空的数据
 *
 * @author yumeng
 */
@Component
public class KuaishouMaterialSyncMd5Job {
    @Autowired
    private IKuaiShouHistoryReportTaskService historyReportTaskService;

    @XxlJob("kuaishouMaterialSyncMd5Job")
    public void execute() throws Exception {
        String nowDate = DateUtils.getDate("yyyy-MM-dd");
        String statDate = getAnotherDay("yyyy-MM-dd", nowDate, -1);
        historyReportTaskService.getMd5V2(statDate);
    }
}
