From be0ee6c04319c8abf92748c3e27c5f370a4bd022 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Wed, 24 Jun 2026 10:39:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=91=8A=E8=AD=A6=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=85=B3=E9=94=AE=E5=AD=97=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ParkingAlarmInformationController.php | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/ParkingAlarmInformationController.php b/app/Http/Controllers/Admin/ParkingAlarmInformationController.php index bff4c23..3f86fd1 100644 --- a/app/Http/Controllers/Admin/ParkingAlarmInformationController.php +++ b/app/Http/Controllers/Admin/ParkingAlarmInformationController.php @@ -4,6 +4,7 @@ namespace App\Http\Controllers\Admin; use App\Exceptions\CustomException; use App\Models\ParkingAlarmInformation; +use App\Services\AdminTranslationService; use App\Services\ApiResponseService; use App\Services\ParkingAlarmInformationService; use Exception; @@ -41,11 +42,29 @@ class ParkingAlarmInformationController extends BaseController if ($request->has('keyword')) { $keyword = $request->input('keyword'); if ($keyword) { - $query->where(function ($q) use ($keyword) { + $type_id = 0; + $nameTypeId = AdminTranslationService::getTypeId(100, $keyword); + if ($nameTypeId) { + $type_id = $nameTypeId; + } + $conditionTypeId = AdminTranslationService::getTypeId(101, $keyword); + if ($conditionTypeId) { + $type_id = $conditionTypeId; + } + $contentTypeId = AdminTranslationService::getTypeId(102, $keyword); + if ($contentTypeId) { + $type_id = $contentTypeId; + } + $remarkTypeId = AdminTranslationService::getTypeId(103, $keyword); + if ($remarkTypeId) { + $type_id = $remarkTypeId; + } + $query->where(function ($q) use ($keyword, $type_id) { $q->orWhere('name', $keyword); $q->orWhere('condition', $keyword); $q->orWhere('content', $keyword); $q->orWhere('remark', $keyword); + $q->orWhere('id', $type_id); }); } }