|
|
@@ -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 |
|
|
|
} |
|
|
|