diff --git a/app/admin/service/BrandSeriesService.php b/app/admin/service/BrandSeriesService.php index 323e117..594605b 100644 --- a/app/admin/service/BrandSeriesService.php +++ b/app/admin/service/BrandSeriesService.php @@ -254,10 +254,13 @@ class BrandSeriesService // 验证系列是否存在 $series = BrandSeries::where('id', $series_id)->first(); if (!$series) { - throw new \Exception("系列ID {$series_id} 不存在"); + throw new \Exception("车辆系列未收录,联系管理员处理"); } // 获取品牌信息 $brand = Brand::where('id', $series->brand_id)->first(); + if (!$brand) { + throw new \Exception("车辆品牌未收录,联系管理员处理"); + } // 保存车型数据 $createdCount = 0;