|
|
@@ -20,12 +20,13 @@ var pvdCfgList = map[string]struct { |
|
|
|
SK string |
|
|
|
Sid string |
|
|
|
}{ |
|
|
|
md.PVD_TB: {"third_taobao_svc_ak", "third_taobao_svc_sk", "third_taobao_web_sid"}, |
|
|
|
md.PVD_KL: {md.KEY_CFG_KL_AK, md.KEY_CFG_KL_SK, ""}, |
|
|
|
md.PVD_SN: {md.KEY_CFG_SN_AK, md.KEY_CFG_SN_SK, ""}, |
|
|
|
md.PVD_JD: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_PDD: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_VIP: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_TB: {"third_taobao_svc_ak", "third_taobao_svc_sk", "third_taobao_web_sid"}, |
|
|
|
md.PVD_KL: {md.KEY_CFG_KL_AK, md.KEY_CFG_KL_SK, ""}, |
|
|
|
md.PVD_SN: {md.KEY_CFG_SN_AK, md.KEY_CFG_SN_SK, ""}, |
|
|
|
md.PVD_JD: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_JDOwn: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_PDD: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
md.PVD_VIP: {md.KEY_CFG_ZM_AK, md.KEY_CFG_ZM_SK, md.KEY_CFG_ZM_WEB_ID}, |
|
|
|
} |
|
|
|
|
|
|
|
func GetAllPlan(eg *xorm.Engine, dbName string) (map[string]*model.PlanReward, map[int]*model.PlanCommission, map[int]string) { |
|
|
@@ -82,6 +83,9 @@ func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*mo |
|
|
|
rewardOpt = rewardOpts["kuaishouTeam"] |
|
|
|
} |
|
|
|
} |
|
|
|
if pvd == md.PVD_JDOwn && (rewardOpts["jd_own"] == nil || (rewardOpts["jd_own"] != nil && rewardOpts["jd_own"].PlanCommissionId == 0)) { |
|
|
|
rewardOpt = rewardOpts["jd"] |
|
|
|
} |
|
|
|
if rewardOpt == nil { |
|
|
|
return nil, zhios_order_relate_logx.Warn("找不到方案记录") |
|
|
|
} |
|
|
@@ -112,6 +116,7 @@ func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*mo |
|
|
|
opt.MerchantRate = float64(int64(rewardOpt.MerchantRate*1e4)) / 1e4 |
|
|
|
opt.NewAgentRate = float64(int64(rewardOpt.NewAgentRate*1e4)) / 1e4 |
|
|
|
opt.OrderBeforeRate = float64(int64(rewardOpt.OrderBeforeRate*1e4)) / 1e4 |
|
|
|
opt.BuckleRate = float64(int64(rewardOpt.BuckleRate*1e4)) / 1e4 |
|
|
|
opt.PlanCommissionId = rewardOpt.PlanCommissionId |
|
|
|
rateList := make(map[string]float64) |
|
|
|
if rewardOpt.RateList != "" { |
|
|
@@ -285,6 +290,7 @@ func PlanOpts(eg *xorm.Engine) map[string]*comm_plan.PlanOpt { |
|
|
|
GlobalRate: float64(v.GlobalRate), |
|
|
|
SelfBuyGlobalRate: v.SelfBuyGlobalRate, |
|
|
|
UserRate: subsidyTmp, |
|
|
|
BuckleRate: v.BuckleRate, |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|