From eb5d7885fa9e4bd20c0827eec9b4cdd48c47b509 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 07 一月 2025 09:11:20 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java index b57e53f..8d2d276 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/TaskUtil.java @@ -2,6 +2,7 @@ import com.ruoyi.account.service.AppUserService; +import com.ruoyi.account.service.VipSettingService; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @@ -16,7 +17,7 @@ @Resource private AppUserService appUserService; - + @@ -29,5 +30,19 @@ appUserService.unbindThePromoter(); } + /** + * 每天的凌晨执行的任务 + */ + @Scheduled(cron = "0 0 0 * * *") + public void taskDay(){ + try { + //降级检测 + appUserService.demotionDetection(); + }catch (Exception e){ + e.printStackTrace(); + } + } + + } -- Gitblit v1.7.1