package com.tax.file.job;


import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.tax.file.service.async.ReadFileTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author breeze
 * @date 2019-08-28
 * <p>
 * 读取文件入库
 */
@Component
public class ReadFileJob implements SimpleJob{
    private static final Logger logger = LoggerFactory.getLogger(ReadFileJob.class);
   
    @Autowired
    ReadFileTask readFileTask;

    @Override
    public void execute(ShardingContext shardingContext) {
    	 logger.info("ReadFileJob is start");
    	  
         readFileTask.readFile();
         logger.info("ReadFileJob is end");
    }
}
