From d16d5a420236a40f2b629a4fb964fd2395cf874f Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Fri, 30 May 2025 15:55:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/console/controller/BrandController.php | 2 +- app/console/controller/VehicleNewController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/console/controller/BrandController.php b/app/console/controller/BrandController.php index ab88108..1637be1 100644 --- a/app/console/controller/BrandController.php +++ b/app/console/controller/BrandController.php @@ -113,7 +113,7 @@ class BrandController extends BaseController $params['filters'][] = ['field' => 'status', 'operator' => '=', 'value' => $params['status']]; } if(!empty($params['name'])){ - $id = BrandTranslationModel::where('name', 'like', '%'.$params['name'].'%')->pluck('id')->toArray(); + $id = BrandTranslationModel::where('name', 'like', '%'.$params['name'].'%')->pluck('brand_id')->toArray(); $params['filters'][] = ['field' => 'id', 'operator' => 'in', 'value' => $id]; } } diff --git a/app/console/controller/VehicleNewController.php b/app/console/controller/VehicleNewController.php index 0156f8a..c46ae08 100644 --- a/app/console/controller/VehicleNewController.php +++ b/app/console/controller/VehicleNewController.php @@ -132,7 +132,7 @@ class VehicleNewController extends BaseController $params['filters'][] = ['field' => 'energy', 'operator' => '=', 'value' => $params['energy']]; } if(!empty($params['name_like'])){ - $id = VehicleNewTranslationModel::where('name', 'like', '%'.$params['name_like'].'%')->pluck('id')->toArray(); + $id = VehicleNewTranslationModel::where('name', 'like', '%'.$params['name_like'].'%')->pluck('vehicle_id')->toArray(); $params['filters'][] = ['field' => 'id', 'operator' => 'in', 'value' => $id]; } }