郑晓宇 6 years ago
parent
commit
d5ce60957b
2 changed files with 7 additions and 1 deletions
  1. 6 0
      app/Console/Commands/robot.php
  2. 1 1
      app/Jobs/Settlement.php

+ 6 - 0
app/Console/Commands/robot.php

@@ -148,6 +148,12 @@ class robot extends Command
                 }
 
                 //结算
+                if($json_data->type == 'round_end'){
+                    echo "回合结束,已结算";
+                    exit;
+                }
+
+                //结算
                 if($json_data->type == 'game_end'){
                     $update_data = [
                         "is_login" => 0,

+ 1 - 1
app/Jobs/Settlement.php

@@ -49,9 +49,9 @@ class Settlement implements ShouldQueue
         }
         //获取当前房间获取问题数
         $room_question_count = RoomQuestion::where("room_id", $this->room_id)->count();
-        //进行结算
         //注册gateway地址
         Gateway::$registerAddress = '127.0.0.1:1238';
+        //进行结算
         if($room_question_count > 4){
 
             //结算当前局