@@ -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 { | func SysCfgFindWithDb(eg *xorm.Engine, masterId string, keys ...string) map[string]string { | ||||
res := map[string]string{} | res := map[string]string{} | ||||
cacheKey := fmt.Sprintf(md.AppCfgCacheKey, masterId) | 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 { | if err != nil || len(res) == 0 { | ||||
cfgList, _ := SysCfgGetAll(eg) | cfgList, _ := SysCfgGetAll(eg) | ||||
if cfgList == nil { | if cfgList == nil { | ||||
@@ -40,7 +40,7 @@ func SysCfgFindWithDb(eg *xorm.Engine, masterId string, keys ...string) map[stri | |||||
for _, v := range *cfgList { | for _, v := range *cfgList { | ||||
res[v.Key] = v.Val | res[v.Key] = v.Val | ||||
} | } | ||||
cache.SetJson(cacheKey, res, md.CfgCacheTime) | |||||
zhios_order_relate_cache.SetJson(cacheKey, res, md.CfgCacheTime) | |||||
} | } | ||||
if len(keys) == 0 { | if len(keys) == 0 { | ||||
return res | return res | ||||
@@ -3,6 +3,7 @@ package rule | |||||
import ( | 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/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/md" | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/svc" | |||||
"context" | "context" | ||||
"errors" | "errors" | ||||
"golang.org/x/sync/errgroup" | "golang.org/x/sync/errgroup" | ||||
@@ -39,7 +40,7 @@ func BatchGetCommission(eg *xorm.Engine, dbName string, commissionParamList []*m | |||||
return errors.New("商品ID缺失") | 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 { | if err != nil { | ||||
return err | return err | ||||
} | } | ||||
@@ -1,4 +1,4 @@ | |||||
package rule | |||||
package svc | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" | "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" |
@@ -1,4 +1,4 @@ | |||||
package rule | |||||
package svc | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" | "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" |
@@ -1,4 +1,4 @@ | |||||
package rule | |||||
package svc | |||||
import ( | import ( | ||||
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" | "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db" |
@@ -1,4 +1,4 @@ | |||||
package cache | |||||
package zhios_order_relate_cache | |||||
import ( | import ( | ||||
"errors" | "errors" | ||||
@@ -1,4 +1,4 @@ | |||||
package cache | |||||
package zhios_order_relate_cache | |||||
import ( | import ( | ||||
"encoding/json" | "encoding/json" | ||||
@@ -1,4 +1,4 @@ | |||||
package cache | |||||
package zhios_order_relate_cache | |||||
import ( | import ( | ||||
"strconv" | "strconv" | ||||
@@ -1,4 +1,4 @@ | |||||
package cache | |||||
package zhios_order_relate_cache | |||||
import ( | import ( | ||||
"errors" | "errors" | ||||
@@ -1,4 +1,4 @@ | |||||
package cache | |||||
package zhios_order_relate_cache | |||||
import ( | import ( | ||||
"strconv" | "strconv" | ||||