车辆搜索
This commit is contained in:
@@ -91,10 +91,26 @@ class VehVehicleSkuService
|
|||||||
case 'default':
|
case 'default':
|
||||||
$config['where']['is_active'] = 1;
|
$config['where']['is_active'] = 1;
|
||||||
$config['order']['id'] = 'desc';
|
$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;
|
break;
|
||||||
case 'index':
|
case 'index':
|
||||||
$config['where']['is_active'] = 1;
|
$config['where']['is_active'] = 1;
|
||||||
$config['order']['id'] = 'desc';
|
$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;
|
break;
|
||||||
case 'show':
|
case 'show':
|
||||||
$config['where']['id'] = $p['id'];
|
$config['where']['id'] = $p['id'];
|
||||||
|
|||||||
Reference in New Issue
Block a user