package com.friday.custody.quartz;

import com.friday.custody.service.logicService.LogicInternalService;
//import com.friday.base.common.response.DubboResult;
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 InitHtscDataByScheduledJob extends QuartzJobBean {

    @Value("${custody.quartz.initHtscDataByScheduled.switch}")
    private Boolean initHtscDataByScheduledSwitch;

    @Autowired
    private LogicInternalService logicInternalService;
    @Override
    protected void executeInternal(JobExecutionContext context) {
        if (!initHtscDataByScheduledSwitch) {
            log.warn("初始化华泰数据开关:未开启!");
            return;
        }
        logicInternalService.initHtscDataByScheduled();
    }

}