From 937895c0c9492b71ff9af29306c3c7b03cc43b49 Mon Sep 17 00:00:00 2001 From: huangjuajun <102564160@qq.com> Date: Mon, 27 Jun 2022 09:41:08 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse=20for=20v1.0.1=20=E5=88=86?= =?UTF-8?q?=E4=BD=A3=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/db_sys_cfg.go | 4 ++-- rule/relate_commission.go | 3 ++- {rule => svc}/get_plan_cfg.go | 2 +- {rule => svc}/reward_commission.go | 2 +- {rule => svc}/user_relative_network.go | 2 +- utils/cache/base.go | 2 +- utils/cache/redis.go | 2 +- utils/cache/redis_cluster.go | 2 +- utils/cache/redis_pool.go | 2 +- utils/cache/redis_pool_cluster.go | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) rename {rule => svc}/get_plan_cfg.go (99%) rename {rule => svc}/reward_commission.go (99%) rename {rule => svc}/user_relative_network.go (98%) diff --git a/db/db_sys_cfg.go b/db/db_sys_cfg.go index c5cab2c..eaa7212 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 := cache.GetJson(cacheKey, &res) + err := zhios_order_relate_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 } - cache.SetJson(cacheKey, res, md.CfgCacheTime) + zhios_order_relate_cache.SetJson(cacheKey, res, md.CfgCacheTime) } if len(keys) == 0 { return res diff --git a/rule/relate_commission.go b/rule/relate_commission.go index f9baeba..95d2fbf 100644 --- a/rule/relate_commission.go +++ b/rule/relate_commission.go @@ -3,6 +3,7 @@ package rule import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/lib/comm_plan" "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/md" + "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/svc" "context" "errors" "golang.org/x/sync/errgroup" @@ -39,7 +40,7 @@ func BatchGetCommission(eg *xorm.Engine, dbName string, commissionParamList []*m return errors.New("商品ID缺失") } - _, _, _, _, lvUser, err := GetRewardCommission(eg, ¶m.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}) + _, _, _, _, lvUser, err := svc.GetRewardCommission(eg, ¶m.CommissionParam, isShare, param.Uid, param.Provider, dbName, isAllLevelReturn, map[string]string{}) if err != nil { return err } diff --git a/rule/get_plan_cfg.go b/svc/get_plan_cfg.go similarity index 99% rename from rule/get_plan_cfg.go rename to svc/get_plan_cfg.go index 52d2977..95d3c32 100644 --- a/rule/get_plan_cfg.go +++ b/svc/get_plan_cfg.go @@ -1,4 +1,4 @@ -package rule +package svc import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" diff --git a/rule/reward_commission.go b/svc/reward_commission.go similarity index 99% rename from rule/reward_commission.go rename to svc/reward_commission.go index 1ebf3fd..0f28dd2 100644 --- a/rule/reward_commission.go +++ b/svc/reward_commission.go @@ -1,4 +1,4 @@ -package rule +package svc import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" diff --git a/rule/user_relative_network.go b/svc/user_relative_network.go similarity index 98% rename from rule/user_relative_network.go rename to svc/user_relative_network.go index 0604034..4e0ee31 100644 --- a/rule/user_relative_network.go +++ b/svc/user_relative_network.go @@ -1,4 +1,4 @@ -package rule +package svc import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" diff --git a/utils/cache/base.go b/utils/cache/base.go index 64648dd..7bc31b2 100644 --- a/utils/cache/base.go +++ b/utils/cache/base.go @@ -1,4 +1,4 @@ -package cache +package zhios_order_relate_cache import ( "errors" diff --git a/utils/cache/redis.go b/utils/cache/redis.go index 4e5f047..5a57e98 100644 --- a/utils/cache/redis.go +++ b/utils/cache/redis.go @@ -1,4 +1,4 @@ -package cache +package zhios_order_relate_cache import ( "encoding/json" diff --git a/utils/cache/redis_cluster.go b/utils/cache/redis_cluster.go index 901f30c..9e2b80c 100644 --- a/utils/cache/redis_cluster.go +++ b/utils/cache/redis_cluster.go @@ -1,4 +1,4 @@ -package cache +package zhios_order_relate_cache import ( "strconv" diff --git a/utils/cache/redis_pool.go b/utils/cache/redis_pool.go index ca38b3f..d8c340c 100644 --- a/utils/cache/redis_pool.go +++ b/utils/cache/redis_pool.go @@ -1,4 +1,4 @@ -package cache +package zhios_order_relate_cache import ( "errors" diff --git a/utils/cache/redis_pool_cluster.go b/utils/cache/redis_pool_cluster.go index cd1911b..82c1211 100644 --- a/utils/cache/redis_pool_cluster.go +++ b/utils/cache/redis_pool_cluster.go @@ -1,4 +1,4 @@ -package cache +package zhios_order_relate_cache import ( "strconv"