package com.friday.custody.quartz;


import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.JobExecutionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.quartz.QuartzJobBean;

@Slf4j
@DisallowConcurrentExecution
public class UpdateZhongxinDataDailyByScheduledJob extends QuartzJobBean {

    @Value("${custody.quartz.updateZhongXinDataDailyByScheduled.switch}")
    private Boolean updateZhongXinDataDailyByScheduledSwitch;

    @Autowired
    private com.friday.custody.service.logicService.impl.LogicInternalServiceImpl LogicInternalServiceImpl;
    @Override
    protected void executeInternal(JobExecutionContext context) {
        if (!updateZhongXinDataDailyByScheduledSwitch) {
            log.warn("每日更新中信数据开关:未开启!");
            return;
        }
        log.info("UpdateZhongxinDataDailyByScheduledJob 更新");
        LogicInternalServiceImpl.updateZhongXinDataDailyByScheduled();
    }

}