|
|
@@ -477,9 +477,14 @@ func JudgeUserBelowLevel(engine *xorm.Engine, uid int) (level int, err error) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
level = son.Level - 1 |
|
|
|
levelEndPosition := getLevelForLastPosition(son.Level, userPublicPlatoonSetting.SeveralTimes) |
|
|
|
if son.Position == levelEndPosition { |
|
|
|
level = son.Level - m.Level |
|
|
|
var list []model.UserPublicPlatoonRelation |
|
|
|
if err = engine.Where("father_uid", son.FatherUid). |
|
|
|
Find(&list); err != nil { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if len(list) == userPublicPlatoonSetting.SeveralTimes { |
|
|
|
level++ |
|
|
|
} |
|
|
|
return |
|
|
|