| | |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | /** |
| | | * 系统模块 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | @EnableScheduling |
| | | public class RuoYiPromotionApplication |
| | | { |
| | | public static void main(String[] args) |
| | |
| | | private final ICouponMemberService couponMemberService; |
| | | |
| | | /** |
| | | * 每天凌晨定时检查优惠券过期 |
| | | * 每小时定时检查优惠券过期 |
| | | */ |
| | | @Scheduled(cron = "1 0 0 * * ?") |
| | | @Scheduled(cron = "0 0 * * * *") |
| | | private void timingCheckMemberCoupon() { |
| | | log.info("----------------定时检查优惠券过期任务开始执行----------------"); |
| | | couponMemberService.timingCheckMemberCoupon(); |