afa 4 mēneši atpakaļ
vecāks
revīzija
17689939c2
1 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 4 3
      application/api/logic/CommonLogic.php

+ 4 - 3
application/api/logic/CommonLogic.php

@@ -20,10 +20,11 @@ class CommonLogic
       public static function setIsUpLevel(int $user_id, int $team_level_id): bool
       {
             $config = config('team_level_where');
+
             if($team_level_id == count($config)) return false;
             $result = false;
             //组合套数
-            $groupCount = UserPledge::getPledgeCount($user_id) + 1;
+            $groupCount = UserPledge::getPledgeCount($user_id) ;
             if($team_level_id == 0){
                   if($groupCount >= $config[$team_level_id]['num']) {
                         $result = true;
@@ -72,7 +73,7 @@ class CommonLogic
             $config = config('team_level_where');
             $result = false;
             //组合套数
-            $groupCount = UserPledge::getPledgeCount($user_id) -1;
+            $groupCount = UserPledge::getPledgeCount($user_id) ;
             if($team_level_id == 1 && $groupCount < $config[0]['num']){
                   $result = true;
                   $team_level_id = 0;
@@ -125,7 +126,7 @@ class CommonLogic
                   ->select();
             if(empty($parents_info) || empty($income)) return true;
       
-            //分享 1 个拿 3 层,分享 2 个拿 7
+            //分享 1 个拿 1 层,分享 2个拿 2
             foreach ($parents_info as $parent){
                   $send_user_id = 0;  //需要发放的会员ID列表
                   if($parent['team_level_id'] >= 1 && $parent['distance'] <= 1){