package com.yida.data.job.task;

import com.yida.data.mall.feign.RemoteBillOrderService;
import com.yida.data.mall.feign.RemoteBillStatisticsService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * 账单模块相关定时任务
 *
 * @author ZYJ
 * @date 2022/4/14
 */
@Component
@AllArgsConstructor
public class BillTask {

    private final RemoteBillOrderService remoteBillOrderService;
    private final RemoteBillStatisticsService remoteBillStatisticsService;

    /**
     * 更新超时账单订单状态
     */
    public void updateBillOrderStatus() {
        remoteBillOrderService.updateBillOrderStatus();
    }

    /**
     * 更新退款订单状态
     */
    public void updateRefundStatus() {
        remoteBillOrderService.updateRefundStatus();
    }

    /**
     * 更新缴费统计数据
     */
    public void updateBillStatistics() {
        remoteBillStatisticsService.updateBillStatistics();
    }

    /**
     * 更新缴费账单明细数据
     */
    public void updateBillPayDetail() {
        remoteBillStatisticsService.updateBillPayDetail();
    }
}
