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();
    }
}
