package com.xinelu.quartz.task;

import com.xinelu.quartz.service.CouponTaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description 优惠券相关定时任务
 * @Author 纪寒
 * @Date 2023-02-28 14:57:33
 * @Version 1.0
 */
@Slf4j
@Component("couponTask")
public class CouponTask {

    @Resource
    private CouponTaskService couponTaskService;

    /**
     * 自动修改会员领取已过期的优惠券状态，第二天凌晨12点半执行一次
     */
    public void patientCouponReceiveStatusTask() {
        couponTaskService.patientCouponReceiveStatusTask();
    }
}
