Sfoglia il codice sorgente

add reverse:for v1.4.1 收益计算更新

tags/v1.4.1
huangjiajun 2 anni fa
parent
commit
18de6d77ae
1 ha cambiato i file con 15 aggiunte e 9 eliminazioni
  1. +15
    -9
      svc/reward_commission.go

+ 15
- 9
svc/reward_commission.go Vedi File

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


Caricamento…
Annulla
Salva