package com.xinelu.quartz.controller;

import com.xinelu.quartz.task.CouponTask;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description 优惠券定时任务控制器
 * @Author 纪寒
 * @Date 2023-02-28 15:04:38
 * @Version 1.0
 */
@RestController
@RequestMapping("/monitor/couponTask")
public class CouponTaskController {

    @Resource
    private CouponTask couponTask;

    /**
     * 手动执行更新会员领取已过期的优惠券状态定时任务
     */
    @GetMapping("/patientCouponStatus")
    public void patientCouponStatus() {
        couponTask.patientCouponReceiveStatusTask();
    }
}
