package com.rf.psychological.douyin.task;

import com.rf.psychological.douyin.service.DouYinService;
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: mimang
 * @Date: 2023/8/18
 */
@Slf4j
@Component
@ConditionalOnProperty(prefix="douyin",name = "isDouYin", havingValue = "true")
public class DouYinOrderTask {

    @Autowired
    private DouYinService douYinService;

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