|
|
@@ -31,7 +31,7 @@ func SysCfgGetOne(Db *xorm.Engine, key string) (*model.SysCfg, error) { |
|
|
|
func SysCfgFindWithDb(eg *xorm.Engine, masterId string, keys ...string) map[string]string { |
|
|
|
res := map[string]string{} |
|
|
|
cacheKey := fmt.Sprintf(md.AppCfgCacheKey, masterId) |
|
|
|
err := zhios_order_relate_cache.GetJson(cacheKey, &res) |
|
|
|
err := cache.GetJson(cacheKey, &res) |
|
|
|
if err != nil || len(res) == 0 { |
|
|
|
cfgList, _ := SysCfgGetAll(eg) |
|
|
|
if cfgList == nil { |
|
|
@@ -40,7 +40,7 @@ func SysCfgFindWithDb(eg *xorm.Engine, masterId string, keys ...string) map[stri |
|
|
|
for _, v := range *cfgList { |
|
|
|
res[v.Key] = v.Val |
|
|
|
} |
|
|
|
zhios_order_relate_cache.SetJson(cacheKey, res, md.CfgCacheTime) |
|
|
|
cache.SetJson(cacheKey, res, md.CfgCacheTime) |
|
|
|
} |
|
|
|
if len(keys) == 0 { |
|
|
|
return res |
|
|
|