From 1408e014fdea2497de7536af3ae58f8d95fde051 Mon Sep 17 00:00:00 2001 From: yxh Date: Wed, 22 Sep 2021 09:41:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=85=8D=E7=BD=AE=E4=B8=BAni?= =?UTF-8?q?l=E5=88=99=E4=B8=8D=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/sys_config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/common/service/sys_config.go b/app/common/service/sys_config.go index 116707c..8f61e0b 100644 --- a/app/common/service/sys_config.go +++ b/app/common/service/sys_config.go @@ -135,7 +135,9 @@ func (s *sysConfig) GetConfigByKey(key string) (config *model.SysConfig, err err if err != nil { return } - cache.Set(global.SysConfigTag+key, config, 0, global.SysConfigTag) + if config != nil { + cache.Set(global.SysConfigTag+key, config, 0, global.SysConfigTag) + } return }