afa 5 сар өмнө
parent
commit
32a6f6dd5b

+ 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;
                   $teamCount = UserModel::where('parent_id', $parent_id)->where('team_level_id', $parent->team_level_id)->count() +1;
                   //组合套数
                   //组合套数
                   $groupCount = UserPledge::getPledgeCount($parent_id);
                   $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->team_level_id -=1;
                         $parent->save();
                         $parent->save();
                   }
                   }