123456789101112131415161718192021222324252627282930313233343536373839 |
- package thyyxxk.wxservice_server.scheduled;
- import lombok.extern.slf4j.Slf4j;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Component;
- import thyyxxk.wxservice_server.service.AppointmentService;
- import thyyxxk.wxservice_server.utils.TradeVectorUtil;
- /**
- * @description: 各种定时刷新任务
- * @author: DingJie
- * @create: 2021/7/517:21
- */
- @Slf4j
- @Component
- public class RefreshTask {
- private final AppointmentService appointmentService;
- @Autowired
- public RefreshTask(AppointmentService appointmentService) {
- this.appointmentService = appointmentService;
- }
- @Scheduled(cron = "0 0 3 ? * SUN")
- public void autoRefreshMzClasses() {
- appointmentService.refreshMzClasses();
- }
- @Scheduled(cron = "0 0 5 * * ?")
- public void autoRefreshNightMzClasses() {
- appointmentService.refreshNightMzClasses();
- }
- @Scheduled(cron = "0 0 3 * * ?")
- public void clearRefundedVector() {
- TradeVectorUtil.clearRefundedVector();
- }
- }
|