郑晓宇 пре 6 година
родитељ
комит
6e79bddef9
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      app/Console/Commands/gamematch.php

+ 4 - 1
app/Console/Commands/gamematch.php

@@ -225,7 +225,10 @@ class gamematch extends Command
                         unset($update_data);
                         //取消用户在房间的状态
                         $update_data['state'] = 2;
-                        RoomUser::where("room_id", $room->room_id)->update($update_data);
+                        RoomUser::where([
+                            "room_id" => $room->room_id, 
+                            "user_id" => $user->user_id,
+                        ])->update($update_data);
                         continue;
                     }
                 }