package com.fs.task;

import com.fs.common.annotation.QuartzRunnable;
import com.fs.store.service.IFsStoreOrderService;
import com.fs.store.service.IFsStorePaymentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Slf4j
@Service("paymentTask")
public class PaymentTask {
    @Autowired
    private IFsStorePaymentService fsStorePaymentService;
    @Autowired
    private IFsStoreOrderService fsStoreOrderService;

    /**
     * 补偿机制，定时反查台州银行
     */
    @QuartzRunnable(name="台州银行补偿机制")
    public void paymentSync() {
        fsStorePaymentService.paymentSync();
    }

    /**
     * 超时订单自动取消
     */
    @QuartzRunnable(name = "超时订单自动取消")
    public void orderCancel(){
        fsStoreOrderService.orderCancel();
    }
}
