From fe774cc16c60c71d221f165a00ffef76c3b0e68a Mon Sep 17 00:00:00 2001
From: Junjie <DELL@qq.com>
Date: 星期四, 08 一月 2026 10:33:14 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/core/News.java | 42 ++++++++++++++++++++++++------------------
1 files changed, 24 insertions(+), 18 deletions(-)
diff --git a/src/main/java/com/zy/core/News.java b/src/main/java/com/zy/core/News.java
index ee6d486..c4263fb 100644
--- a/src/main/java/com/zy/core/News.java
+++ b/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) {
--
Gitblit v1.9.1