From d23a60235f23c5ab0de6984b8ab142ff8e7f0a3b Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Tue, 28 Apr 2026 17:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E4=BD=8D=E8=B5=84=E8=AE=AF=E8=BD=A6?= =?UTF-8?q?=E7=89=8C=E4=BC=98=E5=8C=963?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/ParkingInformationService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Services/ParkingInformationService.php b/app/Services/ParkingInformationService.php index 6ab3f54..1537dbb 100644 --- a/app/Services/ParkingInformationService.php +++ b/app/Services/ParkingInformationService.php @@ -33,14 +33,14 @@ class ParkingInformationService extends BaseService DB::beginTransaction(); $license_plate = $data['license_plate']; - $license_plate = ParkingLicensePlate::query()->where( + $license_plate_data = ParkingLicensePlate::query()->where( 'number', $license_plate )->first(['id', 'space_type_id']); $license_plate_id = 0; - if ($license_plate) { - $license_plate_id = $license_plate['id']; - $space_type_id = $license_plate['space_type_id']; + if ($license_plate_data) { + $license_plate_id = $license_plate_data['id']; + $space_type_id = $license_plate_data['space_type_id']; } else { $space_type_data = ParkingSpaceType::getDefaultData(); $space_type_id = $space_type_data['id'] ?? 0;