diff --git a/db/db_sys_cfg.go b/db/db_sys_cfg.go index eaa7212..c5cab2c 100644 --- a/db/db_sys_cfg.go +++ b/db/db_sys_cfg.go @@ -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 diff --git a/db/db_virtual_coin.go b/db/db_virtual_coin.go index 51fb167..13fcc13 100644 --- a/db/db_virtual_coin.go +++ b/db/db_virtual_coin.go @@ -13,13 +13,13 @@ func VirtualCoinListInUse(Db *xorm.Engine, masterId string) ([]*model.VirtualCoi var m []*model.VirtualCoin cacheKey := fmt.Sprintf(md.VirtualCoinCfgCacheKey, masterId) - err := zhios_order_relate_cache.GetJson(cacheKey, &m) + err := cache.GetJson(cacheKey, &m) if err != nil || len(m) == 0 { err := Db.Where("is_use=1").Find(&m) if err != nil { return nil, err } - zhios_order_relate_cache.SetJson(cacheKey, m, md.CfgCacheTime) + cache.SetJson(cacheKey, m, md.CfgCacheTime) } return m, nil diff --git a/utils/cache/base.go b/utils/cache/base.go index 7bc31b2..64648dd 100644 --- a/utils/cache/base.go +++ b/utils/cache/base.go @@ -1,4 +1,4 @@ -package zhios_order_relate_cache +package cache import ( "errors" diff --git a/utils/cache/redis.go b/utils/cache/redis.go index 5a57e98..4e5f047 100644 --- a/utils/cache/redis.go +++ b/utils/cache/redis.go @@ -1,4 +1,4 @@ -package zhios_order_relate_cache +package cache import ( "encoding/json" diff --git a/utils/cache/redis_cluster.go b/utils/cache/redis_cluster.go index 9e2b80c..901f30c 100644 --- a/utils/cache/redis_cluster.go +++ b/utils/cache/redis_cluster.go @@ -1,4 +1,4 @@ -package zhios_order_relate_cache +package cache import ( "strconv" diff --git a/utils/cache/redis_pool.go b/utils/cache/redis_pool.go index d8c340c..ca38b3f 100644 --- a/utils/cache/redis_pool.go +++ b/utils/cache/redis_pool.go @@ -1,4 +1,4 @@ -package zhios_order_relate_cache +package cache import ( "errors" diff --git a/utils/cache/redis_pool_cluster.go b/utils/cache/redis_pool_cluster.go index 82c1211..cd1911b 100644 --- a/utils/cache/redis_pool_cluster.go +++ b/utils/cache/redis_pool_cluster.go @@ -1,4 +1,4 @@ -package zhios_order_relate_cache +package cache import ( "strconv"