package com.ningdatech.pmapi.sms.task;

import com.ningdatech.yxt.client.YxtContext;
import lombok.RequiredArgsConstructor;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author liuxinxin
 * @date 2022/8/9 下午3:58
 * 音信通定时检查电话结果
 */
@Component
@RequiredArgsConstructor
public class YxtPollingTask {


    private final YxtContext yxtContext;

    /**
     * 校验音信通结果数据
     * 每5分钟执行一次
     */
    @Scheduled(cron = "0 */1 * * * ?")
//    @Scheduled(cron = "${cron-expression.sms-msg-result-check-cron}")
    public void smsMsgResultCheck() {
        yxtContext.smsMsgResultCheck();
    }
}
