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.reset.ResetApplyTask;
import com.yxcheng.token.utils.UUIDGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: tax-sys-test
 * @Package: com.tax.file.job
 * @ClassName: ResetApplyJob
 * @Author: ddx
 * @Description: ${description}
 * @Date: 2021-10-13 15:43
 * @Version: 1.0
 */
@Component
public class ResetApplyJob implements SimpleJob {

    private static final Logger logger = LoggerFactory.getLogger(ResetApplyJob.class);

    @Autowired
    ResetApplyTask resetApplyTask;

    @Override
    public void execute(ShardingContext shardingContext) {
        String uuidFlag = UUIDGenerator.generate();
        logger.info(uuidFlag + " resetApplyTask is start");
        resetApplyTask.resetApply(uuidFlag);
        logger.info(uuidFlag + " resetApplyTask is end");
    }

}
