package com.zfire.jiasm.syncdata.download.basedata;


import com.zfire.jiasm.syncdata.constant.TaskConfigEnum;
import com.zfire.jiasm.syncdata.service.BaseDownService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
// 合到一个线程中 再次分线程

@Slf4j
@Component
public class BaseDataTask {
    @Value("${netfsxc}")
    private String netfsxc = "";
    @Autowired
    BaseDownService baseDownService;





    @Scheduled(fixedDelayString = "${netfsx}")
    public void process() throws Exception {
        if (netfsxc.equals(TaskConfigEnum.FALSE.getCode())){
            return;
        }

        baseDownService.downData();
    }
}
