From 04208b3b5c87347562104704ed75b9298618581e Mon Sep 17 00:00:00 2001 From: "WIN-C27C5MSVTPO\\16961" <1696136552@qq.com> Date: Wed, 24 Sep 2025 15:42:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/service/VehVehicleSkuService.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/common/service/VehVehicleSkuService.php b/app/common/service/VehVehicleSkuService.php index 0fa8649..e494122 100644 --- a/app/common/service/VehVehicleSkuService.php +++ b/app/common/service/VehVehicleSkuService.php @@ -91,10 +91,26 @@ class VehVehicleSkuService case 'default': $config['where']['is_active'] = 1; $config['order']['id'] = 'desc'; + + // 关键字筛选 + if (isset($p['keyword']) && $p['keyword']) { + $k = '%' . $p['keyword'] . '%'; + foreach (['model_name','series_name','brand_name',] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } + } break; case 'index': $config['where']['is_active'] = 1; $config['order']['id'] = 'desc'; + + // 关键字筛选 + if (isset($p['keyword']) && $p['keyword']) { + $k = '%' . $p['keyword'] . '%'; + foreach (['model_name','series_name','brand_name',] as $col) { + $config['orWhere'][] = [$col, 'like', $k]; + } + } break; case 'show': $config['where']['id'] = $p['id'];