|
@@ -1,6 +1,7 @@ |
|
|
package comm_plan |
|
|
package comm_plan |
|
|
|
|
|
|
|
|
import ( |
|
|
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_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" |
|
|
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git/utils/logx" |
|
|
"fmt" |
|
|
"fmt" |
|
@@ -160,6 +161,7 @@ func CalcAdv(opt *PlanOpt, totalAmt, integralTotalAmt float64, userList *LvUser, |
|
|
peerNum = 0 // 存在同级数 |
|
|
peerNum = 0 // 存在同级数 |
|
|
isFirst = 0 |
|
|
isFirst = 0 |
|
|
) |
|
|
) |
|
|
|
|
|
maxLvData, _ := db.UserLevelByID(eg, "2") |
|
|
|
|
|
|
|
|
Loop: |
|
|
Loop: |
|
|
for node.ParentUser != nil { //查找上级用户 |
|
|
for node.ParentUser != nil { //查找上级用户 |
|
@@ -176,6 +178,9 @@ Loop: |
|
|
node = node.ParentUser |
|
|
node = node.ParentUser |
|
|
continue |
|
|
continue |
|
|
} |
|
|
} |
|
|
|
|
|
if node.ParentUser.Lv > 2 && maxLvData != nil { |
|
|
|
|
|
node.ParentUser.LevelWeight = maxLvData.LevelWeight |
|
|
|
|
|
} |
|
|
if isFirst == 0 { |
|
|
if isFirst == 0 { |
|
|
userType := "to_extend" |
|
|
userType := "to_extend" |
|
|
commission, _, amountList, _ := CalReturnAmountAndRatioWineryAdv(node.ParentUser.Lv, userList.OwnbuyReturnType, peerNum, userType, totalAmt, integralTotalAmt, opt) |
|
|
commission, _, amountList, _ := CalReturnAmountAndRatioWineryAdv(node.ParentUser.Lv, userList.OwnbuyReturnType, peerNum, userType, totalAmt, integralTotalAmt, opt) |
|
|