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