会员积分代码提交

This commit is contained in:
Tankaikai 2025-03-01 15:52:01 +08:00
parent 84556a1016
commit 71b9dd20dc
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package com.czg.task;
import com.czg.account.service.PointsExchangeRecordService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
/**
* 积分商品兑换定时任务
*
* @author tankaikai
* @since 2025-03-01 15:49
*/
@Slf4j
@Component
public class PointsProductExchangeTask {
@Resource
private PointsExchangeRecordService pointsExchangeRecordService;
/**
* order 过期
*/
@Scheduled(cron = "0 */1 * * * ?")
public void run() {
pointsExchangeRecordService.authCancel();
}
}