package cn.pluss.platform.job;

import cn.pluss.platform.ryx.RyxTransService;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 瑞银信打款记录查询定时任务
 * @author DJH
 */
@Slf4j
@Configuration
@ConditionalOnProperty(prefix = "scheduling", name = "enabled", havingValue = "true")
public class RyxTransJob {

    @Setter(onMethod_ = {@Autowired})
    private RyxTransService ryxTransService;

    @Scheduled(cron = "0 0/5 8-13 * * ?")
    public void process() {
        // ryxTransService.pullTransRecord();
        ryxTransService.pullYesterdayTransRecord();
    }
}
