From 5c37dd24d5807845212f7ccccc83c008f029eb87 Mon Sep 17 00:00:00 2001 From: "HESU\\HESU" <1696136552@qq.com> Date: Thu, 22 May 2025 17:08:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E4=BF=AE=E6=94=B9=E6=97=B6?= =?UTF-8?q?=E7=9A=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/console/service/VehicleNewService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/console/service/VehicleNewService.php b/app/console/service/VehicleNewService.php index 0e8a9fc..d377df2 100644 --- a/app/console/service/VehicleNewService.php +++ b/app/console/service/VehicleNewService.php @@ -278,6 +278,7 @@ class VehicleNewService extends BaseService throw new BusinessException('提交失败:常见问题'); } } else { + unset($asked['id']); $asked_res = $VehicleNewAskedService->create($asked); if (!$asked_res) { throw new BusinessException('提交失败:常见问题'); @@ -306,6 +307,7 @@ class VehicleNewService extends BaseService throw new BusinessException('提交失败:车辆特性'); } } else { + unset($trait['id']); $trait_res = $VehicleNewAskedService->create($trait); if (!$trait_res) { throw new BusinessException('提交失败:车辆特性'); @@ -332,8 +334,6 @@ class VehicleNewService extends BaseService // } $albumsId = []; -// var_dump(!empty($album['id'])); - $album['vehicle_id'] = 78; if(!empty($album['id'])){ $albumId =$album['id']; $albumsId[] =$albumId; @@ -342,6 +342,7 @@ class VehicleNewService extends BaseService throw new BusinessException('提交失败:车辆图册'); } } else { + unset($album['id']); $album_res = $VehicleNewAlbumService->create($album); if (!$album_res) { throw new BusinessException('提交失败:车辆图册1'); @@ -371,12 +372,12 @@ class VehicleNewService extends BaseService if(!empty($content['id'])){ $contentId =$content['id']; $contentsId[] =$contentId; - $content['vehicle_id'] = 78; $content_res = $VehicleNewContentService->update($contentId,$content); if (!$content_res) { throw new BusinessException('提交失败:车辆介绍1'); } } else { + unset($content['id']); $content_res = $VehicleNewAskedService->create($content); if (!$content_res) { throw new BusinessException('提交失败:车辆介绍');