| | |
| | | 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; |
| | |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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) { |