vip过期使用的勋章自动摘除,勋章过期

This commit is contained in:
2025-06-10 11:10:00 +08:00
parent 1dd600014f
commit 7a80dbcf6a
4 changed files with 132 additions and 34 deletions

View File

@@ -0,0 +1,25 @@
package com.accompany.scheduler.task.dress;
import com.accompany.business.service.medal.UserMedalService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Component
@Slf4j
public class UserMedalTask {
@Autowired
private UserMedalService userMedalService;
/**
* 核销到期的勋章
*/
@Scheduled(cron = "0 0/10 * * * ?")
public void checkVip() {
userMedalService.doExpireCheck();
}
}