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.FileUrlResetTask;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author breeze
 * @date 2019-09-02
 * <p>
 * 文件URL重置，获取生成日期大于等于6天的URL，重新生成URL
 */
@Component
public class FileUrlResetJob implements SimpleJob{
    private static final Logger logger = LoggerFactory.getLogger(FileUrlResetJob.class);
   
    @Autowired
    FileUrlResetTask fileUrlResetTask;

    @Override
    public void execute(ShardingContext shardingContext) {
    	 logger.info("FileUrlResetJob is start");
    	  
    	 fileUrlResetTask.urlReset();
         logger.info("FileUrlResetJob is end");
    }
}
