|
|
@@ -159,8 +159,13 @@ Loop: |
|
|
|
// 同级奖 |
|
|
|
if node.ParentUser.LevelWeight == maxLevelWeight && count > peerNum { |
|
|
|
if peerNum >= 1 && node.ParentUser.Lv >= 2 { |
|
|
|
checkCond(eg, node.ParentUser.Uid, teamCountMin) |
|
|
|
Check(eg, node.ParentUser.Uid, teamCountMin) |
|
|
|
teamtotal := db.GetUserTeamTotal(eg, zhios_order_relate_utils.IntToStr(node.ParentUser.Uid)) |
|
|
|
if teamtotal != nil && teamtotal.IsSet == 1 { |
|
|
|
node.ParentUser.IsFreeze = 0 |
|
|
|
} else { |
|
|
|
checkCond(eg, node.ParentUser.Uid, teamCountMin) |
|
|
|
node.ParentUser.IsFreeze = Check(eg, node.ParentUser.Uid, teamCountMin) |
|
|
|
} |
|
|
|
} |
|
|
|
peerRate = 0 |
|
|
|
//同级奖励比例 |
|
|
@@ -267,7 +272,7 @@ func Check(eg *xorm.Engine, uid, teamCountMin int) int { |
|
|
|
return isAllFreeze |
|
|
|
} |
|
|
|
func checkCond(eg *xorm.Engine, uid, teamCountMin int) (int, int) { |
|
|
|
isfreeze := 0 |
|
|
|
isfreeze := 1 |
|
|
|
teamtotal := db.GetUserTeamTotal(eg, zhios_order_relate_utils.IntToStr(uid)) |
|
|
|
total := 0 |
|
|
|
if teamtotal == nil || teamtotal != nil && teamtotal.TeamCount < teamCountMin { |
|
|
@@ -301,14 +306,15 @@ func checkCond(eg *xorm.Engine, uid, teamCountMin int) (int, int) { |
|
|
|
teamtotal.TeamCount = nCount |
|
|
|
eg.Where("uid=?", uid).Update(teamtotal) |
|
|
|
} |
|
|
|
if nCount < teamCountMin { |
|
|
|
isfreeze = 1 |
|
|
|
} |
|
|
|
|
|
|
|
total = nCount |
|
|
|
} |
|
|
|
} else { |
|
|
|
total = teamtotal.TeamCount |
|
|
|
} |
|
|
|
if total >= teamCountMin { |
|
|
|
isfreeze = 1 |
|
|
|
} |
|
|
|
return isfreeze, total |
|
|
|
} |
|
|
|
|
|
|
|