package com.dxhy.core.job.thread;

import javax.annotation.Resource;

import com.dxhy.common.utils.SpringContextUtils;
import com.dxhy.core.job.entity.TDxHttpLog;
import com.dxhy.core.job.service.InvoiceInterfaceService;

/**
 * @author user
 */
public class InvoiceParseHandle extends Thread {
    @Resource
    private InvoiceInterfaceService invoiceInterfaceService;

    private final String taxno;
    private final String db;

    /**
     * 入参，执行接口方法
     *
     * @param responseJson
     *            人、返回信息
     * @param tDxHttpLog
     *            日志信息
     * @param db
     *            数据库
     */
    public InvoiceParseHandle(String taxno, String db) {
        this.taxno = taxno;
        this.db = db;
    }

    @Override
    public void run() {
        invoiceInterfaceService = (InvoiceInterfaceService)SpringContextUtils.getBean("InvoiceInterfaceService");
        invoiceInterfaceService.subscribe(taxno, db);
    }
}
