兼容修改时的id
This commit is contained in:
@@ -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('提交失败:车辆介绍');
|
||||
|
||||
Reference in New Issue
Block a user