#
Junjie
3 天以前 fe774cc16c60c71d221f165a00ffef76c3b0e68a
#
1个文件已修改
42 ■■■■■ 已修改文件
src/main/java/com/zy/core/News.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/News.java
@@ -1,13 +1,10 @@
package com.zy.core;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.SpringUtils;
import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.service.WrkMastService;
import com.zy.common.utils.RedisUtil;
import com.zy.core.enums.RedisKeyType;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import java.lang.reflect.Array;
@@ -104,12 +101,15 @@
    public static void info(String format, Object... arguments) {
        if (format.contains("[WCS Debug]")) {
            ConfigService configService = SpringUtils.getBean(ConfigService.class);
            if(configService != null) {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            if(redisUtil != null) {
                boolean show = true;
                Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "wcsDebugShowLog"));
                if(config != null) {
                    show = config.getValue().equals("true");
                Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
                if (systemConfigMapObj != null) {
                    HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
                    if (systemConfigMap.get("wcsDebugShowLog") != null) {
                        show = systemConfigMap.get("wcsDebugShowLog").equals("true");
                    }
                }
                if (!show) {
@@ -139,12 +139,15 @@
    public static void warn(String format, Object... arguments) {
        if (format.contains("[WCS Debug]")) {
            ConfigService configService = SpringUtils.getBean(ConfigService.class);
            if(configService != null) {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            if(redisUtil != null) {
                boolean show = true;
                Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "wcsDebugShowLog"));
                if(config != null) {
                    show = config.getValue().equals("true");
                Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
                if (systemConfigMapObj != null) {
                    HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
                    if (systemConfigMap.get("wcsDebugShowLog") != null) {
                        show = systemConfigMap.get("wcsDebugShowLog").equals("true");
                    }
                }
                if (!show) {
@@ -174,12 +177,15 @@
    public static void error(String format, Object... arguments) {
        if (format.contains("[WCS Debug]")) {
            ConfigService configService = SpringUtils.getBean(ConfigService.class);
            if(configService != null) {
            RedisUtil redisUtil = SpringUtils.getBean(RedisUtil.class);
            if(redisUtil != null) {
                boolean show = true;
                Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "wcsDebugShowLog"));
                if(config != null) {
                    show = config.getValue().equals("true");
                Object systemConfigMapObj = redisUtil.get(RedisKeyType.SYSTEM_CONFIG_MAP.key);
                if (systemConfigMapObj != null) {
                    HashMap<String, String> systemConfigMap = (HashMap<String, String>) systemConfigMapObj;
                    if (systemConfigMap.get("wcsDebugShowLog") != null) {
                        show = systemConfigMap.get("wcsDebugShowLog").equals("true");
                    }
                }
                if (!show) {