路泰机电科技体检——数据平台后端
zhaowenxuan
2024-12-19 d3e9ae0b5f000e52bd54962644be8e9feec0df4a
src/main/java/com/example/scheudleds/DictSync.java
@@ -1,5 +1,7 @@
package com.example.scheudleds;
import cn.hutool.core.util.StrUtil;
import com.example.config.ConfigValue;
import com.example.utils.DictionaryUtil;
import com.example.utils.DictionaryUtilNew;
import lombok.extern.slf4j.Slf4j;
@@ -21,12 +23,16 @@
    private DictionaryUtil dictionaryUtil;
    @Autowired
    private DictionaryUtilNew dictionaryUtilNew;
    @Autowired
    private ConfigValue configValue;
    /**
     * 字典同步
     */
    @Scheduled(cron = "0 0 22 * * ? ")
    public void execDict(){
        String open = configValue.getConfigValue("sjpt_open");
        if (StrUtil.isNotBlank(open) && open.equals("false")) return;
        FileWriter fileWriter = null;
        try {
            fileWriter = new FileWriter("src/main/resources/log.log");