Bläddra i källkod

add reverse:for v3.8.3 test

tags/v3.8.3
huangjiajun 2 år sedan
förälder
incheckning
2e7996b17e
2 ändrade filer med 17 tillägg och 4 borttagningar
  1. +2
    -0
      rule/relate_commission.go
  2. +15
    -4
      svc/reward_commission.go

+ 2
- 0
rule/relate_commission.go Visa fil

@@ -22,10 +22,12 @@ func GetComm(eg *xorm.Engine) map[string]string {
var arg = map[string]string{
"virType": virType,
"integralRewardMultiple": "0",
"integralCoinId": "0",
}
chain := db.GetGreenChain(eg)
if chain != nil {
arg["integralRewardMultiple"] = zhios_order_relate_utils.IntToStr(chain.IntegralRewardMultiple)
arg["integralCoinId"] = zhios_order_relate_utils.IntToStr(chain.Coin2)
}
return arg
}


+ 15
- 4
svc/reward_commission.go Visa fil

@@ -220,17 +220,28 @@ func GetRewardCommission(engine *xorm.Engine, rmd *md.CommissionParam, isShare b
if ulink == nil {
return 0, 0, 0, 0, nil, nil
}
comm(commArr, ulink)
return ulink.Profit, pvdFee, sysFee, subsidyFee, ulink, nil
}
func comm(commArr map[string]string, ulink *comm_plan.LvUser) *comm_plan.LvUser {
if zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"]) > 0 {
for k, v := range ulink.OwnSubsidyFeeList {
ulink.OwnSubsidyFeeList[k] = v * zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"])
if k == commArr["integralCoinId"] && zhios_order_relate_utils.StrToInt(k) > 0 {
ulink.OwnSubsidyFeeList[k] = v * zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"])
}
}
for k, v := range ulink.ProfitList {
ulink.ProfitList[k].Val = v.Val * zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"])
if v.Cid == commArr["integralCoinId"] && zhios_order_relate_utils.StrToInt(v.Cid) > 0 {
ulink.ProfitList[k].Val = v.Val * zhios_order_relate_utils.StrToFloat64(commArr["integralRewardMultiple"])
}
}
}

return ulink.Profit, pvdFee, sysFee, subsidyFee, ulink, nil
if ulink.ParentUser != nil {
ulink.ParentUser = comm(commArr, ulink.ParentUser)
}
return ulink
}

func getRewardLink(uid string, diff int, reward map[string]string, ulinkParent *comm_plan.LvUser, types string, cfg *comm_plan.PlanOpt) *comm_plan.LvUser {
var SubsidyFee = zhios_order_relate_utils.StrToFloat64(reward["0"])
var SubsidyFeeList = make([]*comm_plan.VirtualCoinCommission, 0)


Laddar…
Avbryt
Spara