| | |
| | | package com.ruoyi.account.util; |
| | | |
| | | |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.service.VipSettingService; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Resource |
| | | private AppUserService appUserService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Scheduled(fixedRate = 1000 * 60) |
| | | public void sendVipCoupon(){ |
| | | |
| | | //解绑推广人 |
| | | appUserService.unbindThePromoter(); |
| | | //关闭充值订单 |
| | | appUserService.closeOrder(); |
| | | } |
| | | |
| | | @Scheduled(fixedRate = 1000 * 60) |
| | | public void changeVipId(){ |
| | | |
| | | |
| | | /** |
| | | * 每天的凌晨执行的任务 |
| | | */ |
| | | @Scheduled(cron = "0 0 0 * * *") |
| | | public void taskDay(){ |
| | | try { |
| | | //降级检测 |
| | | appUserService.demotionDetection(); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |