package org.jeecg.modules.ctop.job;

import cn.com.ctop.common.module.service.ICtopOauthTokenService;
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.concurrent.ExecutorService;

/**
 * 获取文件状态并下载入库
 *
 * @author yumeng
 */
@Slf4j
public class KuaishouHistoryLoadFileJob implements Job {
    @Autowired
    private ICtopOauthTokenService tokenService;
    static ExecutorService executorService = null;
    @Autowired
    private IKuaiShouHistoryReportTaskService historyReportTaskService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        Thread thread = new Thread() {
            @Override
            public void run() {
                historyReportTaskService.getTaskList();
            }

        };
        thread.start();

    }
}
