fix: 参数配置redis查询取值异常

This commit is contained in:
TsMask committed 2023-10-27 15:27:04 +08:00
1 parent f70c169de7
commit 2250c5e511
2 files changed
+4 -4

No files matched your search

@@ -34,8 +34,8 @@ func (r *SysConfigImpl) SelectConfigList(sysConfig model.SysConfig) []model.SysC
func (r *SysConfigImpl) SelectConfigValueByKey(configKey string) string {
cacheKey := r.getCacheKey(configKey)
// 从缓存中读取
cacheValue, err := redis.Get("", cacheKey)
if cacheValue != "" || err != nil {
cacheValue, _ := redis.Get("", cacheKey)
if cacheValue != "" {
return cacheValue
}
// 无缓存时读取数据放入缓存中