Browse Source

更新

tags/v4.3.1
huangjiajun 1 year ago
parent
commit
8fffb4d762
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      lib/comm_plan/winery_adv.go

+ 5
- 0
lib/comm_plan/winery_adv.go View File

@@ -1,6 +1,7 @@
package comm_plan

import (
"code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/db"
zhios_order_relate_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/logx"
"fmt"
@@ -160,6 +161,7 @@ func CalcAdv(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUser,
peerNum = 0 // 存在同级数
isFirst = 0
)
maxLvData, _ := db.UserLevelByID(eg, "2")

Loop:
for node.ParentUser != nil { //查找上级用户
@@ -176,6 +178,9 @@ Loop:
node = node.ParentUser
continue
}
if node.ParentUser.Lv > 2 && maxLvData != nil {
node.ParentUser.LevelWeight = maxLvData.LevelWeight
}
if isFirst == 0 {
userType := "to_extend"
commission, _, amountList, _ := CalReturnAmountAndRatioWineryAdv(node.ParentUser.Lv, userList.OwnbuyReturnType, peerNum, userType, totalAmt, integralTotalAmt, opt)


Loading…
Cancel
Save