package com.xinelu.quartz.controller;

import com.xinelu.quartz.task.RefundHealthConsultationOrderTask;
import com.xinelu.quartz.task.RefundInfoTask;
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 2022-10-25 14:39:10
 * @Version 1.0
 */
@RestController
@RequestMapping("/monitor/refundTask")
public class RefundInfoTaskController {

    @Resource
    private RefundInfoTask refundInfoTask;
    @Resource
    private RefundHealthConsultationOrderTask refundHealthConsultationOrderTask;

    /**
     * 手动执行修改退款单状态定时任务
     */
    @GetMapping("/handleRefundStatus")
    public void handleRefundStatus() {
        refundInfoTask.automaticProcessRefundInfo();
    }

    /**
     * 手动执行处理专家咨询订单医生手动拒单定时任务
     */
    @GetMapping("/handleHealthConsultationStatus")
    public void handleHealthConsultationRefund() {
        refundHealthConsultationOrderTask.automaticProcessHealthConsultationRefund();
    }
}
