package com.xinelu.quartz.task;

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

import javax.annotation.Resource;

/**
 * @Description
 * @Author 纪寒
 * @Date 2022-10-25 14:35:59
 * @Version 1.0
 */
@Slf4j
@Component("refundTask")
public class RefundInfoTask {

    @Resource
    private RefundInfoTaskService refundInfoTaskService;

    /**
     * 自动处理退款状态定时任务，
     * 防止由于网络等其它原因未接受到退款回调通知进而导致的退款单状态修改不及时
     */
    public void automaticProcessRefundInfo() {
        log.info("开始执行关闭退款状态定时任务........");
        refundInfoTaskService.automaticProcessRefundInfo();
        log.info("完成关闭退款状态定时任务........");
    }
}
