From 871a1395879bbb7a50e1419ebab316406533ef24 Mon Sep 17 00:00:00 2001 From: "allen.yan" Date: Wed, 28 May 2025 11:43:38 +0800 Subject: [PATCH] =?UTF-8?q?BUG=20=20=E5=95=8F=E9=A1=8C=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=2020250528?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/RoomControlController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/RoomControlController.php b/app/Http/Controllers/RoomControlController.php index af93f8c..e18bff7 100644 --- a/app/Http/Controllers/RoomControlController.php +++ b/app/Http/Controllers/RoomControlController.php @@ -252,9 +252,9 @@ class RoomControlController extends Controller public function sendSwitch(SendRoomSwitchCommandRequest $request): JsonResponse { $validated = $request->validated(); - + $branch = Branch::where('name',$validated['branch_name'])->first(); $room = Room::where([ - ['branch_name', $validated['branch_name']], + ['branch_id', $branch->id], ['name', $validated['room_name']], ])->first();