Parcourir la source

add reverse:for v3.8.3 test

tags/v3.8.3
huangjiajun il y a 2 ans
Parent
révision
2e7996b17e
2 fichiers modifiés avec 17 ajouts et 4 suppressions
  1. +2
    -0
      rule/relate_commission.go
  2. +15
    -4
      svc/reward_commission.go

+ 2
- 0
rule/relate_commission.go Voir le fichier

@@ -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 Voir le fichier

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


Chargement…
Annuler
Enregistrer