package com.dxhy.core.thread;

import com.dxhy.core.job.pojo.CheckNoDetailInvoice;
import com.dxhy.core.job.service.CheckTaskService;

import lombok.extern.slf4j.Slf4j;

/**
 * 功能描述
 *
 * @author 陈刚扬
 * @date 2020/10/29
 * @return
 */
@Slf4j
public class CheckThread extends Thread {
    private final CheckTaskService checkTaskService;
    private final CheckNoDetailInvoice checkNoDetailInvoice;
    private final String db;

    public CheckThread(CheckTaskService checkTaskService, String db, CheckNoDetailInvoice checkNoDetailInvoice) {
        this.checkTaskService = checkTaskService;
        this.checkNoDetailInvoice = checkNoDetailInvoice;
        this.db = db;
    }

    @Override
    public void run() {
        try {
            checkTaskService.checkOne(checkNoDetailInvoice, db);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
