package com.chinacreator.video.thread;

import com.chinacreator.video.bean.WoInnovateBean;
import com.chinacreator.video.mapper.WoInnovateDao;
import com.chinacreator.video.util.SpringBeanUtil;
import com.chinacreator.video.service.WoInnovateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;


public class WoInnovateThread implements Runnable {


    WoInnovateService woInnovateService;

    private WoInnovateBean bean;
    public WoInnovateThread(WoInnovateBean bean) {
        this.bean = bean;
    }




    public void run() {
        try {
            woInnovateService = SpringBeanUtil.getBean(WoInnovateService.class);
            //异步处理
            woInnovateService.order(bean);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
