he2802 2 سال پیش
والد
کامیت
fc3997544b

+ 0 - 1
zhongzheng-common/src/main/java/com/zhongzheng/common/core/redis/RedisCache.java

@@ -127,7 +127,6 @@ public class RedisCache
                 unionKey = tenantId + key;
             }
         }
-
         return redisTemplate.delete(unionKey);
     }
 

+ 2 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/system/service/impl/SysConfigServiceImpl.java

@@ -22,6 +22,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 /**
  * 参数配置 服务层实现
@@ -72,7 +73,7 @@ public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig
         SysConfig retConfig = baseMapper.selectOne(new LambdaQueryWrapper<SysConfig>()
                 .eq(SysConfig::getConfigKey, configKey));
         if (Validator.isNotNull(retConfig)) {
-            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue());
+            redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue(),120, TimeUnit.MINUTES);
             return retConfig.getConfigValue();
         }
         return StrUtil.EMPTY;