From 18de6d77ae121310186e4f4c2491a6267300a824 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Wed, 13 Jul 2022 21:34:09 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.4.1=20=E6=94=B6=E7=9B=8A?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- svc/reward_commission.go | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/svc/reward_commission.go b/svc/reward_commission.go index 94a4dda..32aeac4 100644 --- a/svc/reward_commission.go +++ b/svc/reward_commission.go @@ -104,15 +104,15 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b profit := zhios_order_relate_utils.StrToFloat64(reward.SelfRateList["0"]) var ulink = &comm_plan.LvUser{} //共富收益处理 - ulink = getRewardLink(reward.CommonWealthBenefitUid, 2, reward.CommonWealthSystem, ulink) + ulink = getRewardLink(reward.CommonWealthBenefitUid, 2, reward.CommonWealthSystem, ulink, "public_platoon") //直推收益处理 - ulink = getRewardLink(reward.DirectPushBenefitUid, 1, reward.DirectPush, ulink) + ulink = getRewardLink(reward.DirectPushBenefitUid, 1, reward.DirectPush, ulink, "extend") //自购 - ulink = getRewardLink(reward.Uid, 0, reward.SelfRateList, ulink) + ulink = getRewardLink(reward.Uid, 0, reward.SelfRateList, ulink, "own") return profit, pvdFee, sysFee, 0, ulink, nil } } -func getRewardLink(uid string, diff int, reward map[string]string, ulinkParent *comm_plan.LvUser) *comm_plan.LvUser { +func getRewardLink(uid string, diff int, reward map[string]string, ulinkParent *comm_plan.LvUser, types string) *comm_plan.LvUser { var SubsidyFee = zhios_order_relate_utils.StrToFloat64(reward["0"]) var SubsidyFeeList = make([]*comm_plan.VirtualCoinCommission, 0) for k, v := range reward { @@ -124,11 +124,17 @@ func getRewardLink(uid string, diff int, reward map[string]string, ulinkParent * } //组装数据 var ulink = &comm_plan.LvUser{ - Uid: zhios_order_relate_utils.StrToInt(uid), - SubsidyFee: SubsidyFee, - SubsidyFeeList: SubsidyFeeList, - Diff: diff, - ParentUser: ulinkParent, + Uid: zhios_order_relate_utils.StrToInt(uid), + + Diff: diff, + ParentUser: ulinkParent, + } + if types == "public_platoon" { + ulink.SubsidyFee = SubsidyFee + ulink.SubsidyFeeList = SubsidyFeeList + } else { + ulink.Profit = SubsidyFee + ulink.ProfitList = SubsidyFeeList } return ulink }