@@ -3,17 +3,18 @@ package comm_plan | |||||
import "xorm.io/xorm" | import "xorm.io/xorm" | ||||
var Fn = map[string]func(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUser, pvd string, sysFee float64, integralSysFee float64, level, levelWeight int, eg *xorm.Engine) error{ | var Fn = map[string]func(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUser, pvd string, sysFee float64, integralSysFee float64, level, levelWeight int, eg *xorm.Engine) error{ | ||||
"lv_all": CalcAll, | |||||
"niubei_commission": NiuBeiCalcAll, | |||||
"niubei_amount": NiuBeiCalcAll, | |||||
"lv_self": CalcSelf, | |||||
"lv_subsidy": CalcAll, | |||||
"lv_price": CalcAll, | |||||
"lv_price_public_platoon": CalcAll, | |||||
"lv_winery": CalcWinery, | |||||
"lv_winery_adv": CalcAdv, | |||||
"lv_price_other": CalcOther, | |||||
"lv_ds_check": CalcDsCheck, | |||||
"lv_all": CalcAll, | |||||
"niubei_commission": NiuBeiCalcAll, | |||||
"niubei_amount": NiuBeiCalcAll, | |||||
"lv_self": CalcSelf, | |||||
"lv_subsidy": CalcAll, | |||||
"lv_price": CalcAll, | |||||
"lv_price_public_platoon": CalcAll, | |||||
"lv_commission_public_platoon": CalcAll, | |||||
"lv_winery": CalcWinery, | |||||
"lv_winery_adv": CalcAdv, | |||||
"lv_price_other": CalcOther, | |||||
"lv_ds_check": CalcDsCheck, | |||||
} | } | ||||
type NiuBeiIntegralReleaseO2oRatio struct { | type NiuBeiIntegralReleaseO2oRatio struct { | ||||
@@ -219,7 +219,7 @@ func GetPlanCfg(eg *xorm.Engine, pvd, masterId string, rewardOpts map[string]*mo | |||||
return opt, nil | return opt, nil | ||||
} | } | ||||
if zhios_order_relate_utils.InArr(commissionOpt.Mode, []string{"lv_price_public_platoon"}) { | |||||
if zhios_order_relate_utils.InArr(commissionOpt.Mode, []string{"lv_price_public_platoon", "lv_commission_public_platoon"}) { | |||||
if err := json.Unmarshal([]byte(commissionOpt.Data), &subsidyTmpPricePublic); err != nil { | if err := json.Unmarshal([]byte(commissionOpt.Data), &subsidyTmpPricePublic); err != nil { | ||||
return nil, zhios_order_relate_logx.Warn(fmt.Sprintf("%s:分佣方案数据设置错误", masterId)) | return nil, zhios_order_relate_logx.Warn(fmt.Sprintf("%s:分佣方案数据设置错误", masterId)) | ||||
} | } | ||||
@@ -261,7 +261,7 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b | |||||
if ulink == nil { | if ulink == nil { | ||||
return 0, 0, 0, 0, nil, nil | return 0, 0, 0, 0, nil, nil | ||||
} | } | ||||
if cfg.Mode == "lv_price_public_platoon" { | |||||
if cfg.Mode == "lv_price_public_platoon" || cfg.Mode == "lv_commission_public_platoon" { | |||||
ulink = public(engine, ulink, cfg, newProvider, uid, comf, price, rmd) | ulink = public(engine, ulink, cfg, newProvider, uid, comf, price, rmd) | ||||
} | } | ||||
comm(commArr, ulink) | comm(commArr, ulink) | ||||