| | |
| | | import com.zy.acs.manager.manager.enums.StatusType; |
| | | import com.zy.acs.manager.manager.service.GuaranteeService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.scheduling.support.CronExpression; |
| | |
| | | @Component |
| | | public class GuaranteeScheduler { |
| | | |
| | | private final GuaranteeService guaranteeService; |
| | | private final GuaranteeRuntimeService guaranteeRuntimeService; |
| | | @Autowired |
| | | private GuaranteeService guaranteeService; |
| | | @Autowired |
| | | private GuaranteeRuntimeService guaranteeRuntimeService; |
| | | |
| | | @Value("${guarantee.scheduler.enabled:true}") |
| | | private boolean enabled; |
| | | @Value("${guarantee.scheduler.default-lead-minutes:60}") |
| | | private int defaultLeadMinutes; |
| | | |
| | | public GuaranteeScheduler(GuaranteeService guaranteeService, |
| | | GuaranteeRuntimeService guaranteeRuntimeService) { |
| | | this.guaranteeService = guaranteeService; |
| | | this.guaranteeRuntimeService = guaranteeRuntimeService; |
| | | } |
| | | |
| | | @Scheduled(cron = "0/15 * * * * ?") |
| | | public void drive() { |