车型搜索

This commit is contained in:
2025-10-11 10:18:30 +08:00
parent e3572cde9e
commit 788d962044
2 changed files with 13 additions and 2 deletions
@@ -5,6 +5,8 @@ namespace app\common\service;
use app\common\logic\Fingerprint;
use app\common\logic\ModelNaming;
use app\common\logic\SkuCodeBuilder;
use app\common\model\Brand;
use app\common\model\BrandSeries;
use app\common\validate\VehVehicleSkuValidate;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\VehVehicleSku;
@@ -111,6 +113,15 @@ class VehVehicleSkuService
$config['orWhere'][] = [$col, 'like', $k];
}
}
if(isset($p['brand_id']) && $p['brand_id']){
$brand_code = Brand::where('id', $p['brand_id'])->value('brand_code');
$config['where']['brand_code'] = $brand_code;
}
if(isset($p['series_id']) && $p['series_id']){
$series_code = BrandSeries::where('id', $p['series_id'])->value('series_code');
$config['where']['series_code'] = $series_code;
}
break;
case 'show':
$config['where']['id'] = $p['id'];