package com.rf.psychological.wxpay.task;

import com.rf.psychological.wxpay.service.WxPayService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


/**
 * @Description:微信定时器
 * @Author: zsf
 * @Date: 2022/6/23
 */

@Slf4j
@Component
@ConditionalOnProperty(prefix="wx.pay",name = "is_lan", havingValue = "false")
public class WxTask {

    @Autowired
    private WxPayService wxPayService;

    @Scheduled(cron = "0/30 * * * * ?")
    public void taskQueryOrder() throws Exception {
        wxPayService.checkOrderStatus();
    }
}
