浏览代码

上级降低级

afa 5 月之前
父节点
当前提交
32a6f6dd5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/api/logic/CommonLogic.php

+ 1 - 1
application/api/logic/CommonLogic.php

@@ -91,7 +91,7 @@ class CommonLogic
                   $teamCount = UserModel::where('parent_id', $parent_id)->where('team_level_id', $parent->team_level_id)->count() +1;
                   //组合套数
                   $groupCount = UserPledge::getPledgeCount($parent_id);
-                  if($teamCount < $config[$parent->team_level_id]['direct'] && $groupCount >= $config[$parent->team_level_id]['num']){
+                  if($teamCount < $config[$parent->team_level_id]['direct'] || $groupCount < $config[$parent->team_level_id]['num']){
                         $parent->team_level_id -=1;
                         $parent->save();
                   }