|
|
|
@ -165,18 +165,20 @@ class ParkingPatternSpaceService extends BaseService |
|
|
|
return []; |
|
|
|
} |
|
|
|
|
|
|
|
// 车位删除同步删除已添加的绘制地图 |
|
|
|
public static function syncDeleteMapSpace($space_id) |
|
|
|
// 车位删除同步删除已添加模式车位 |
|
|
|
public static function syncDelPatternSpace($space_id) |
|
|
|
{ |
|
|
|
$id = ParkingPatternSpace::query()->where([ |
|
|
|
$ids = ParkingPatternSpace::query()->where([ |
|
|
|
'space_id' => $space_id |
|
|
|
])->value('id'); |
|
|
|
if ($id) { |
|
|
|
$model = ParkingPatternSpace::query()->findOrFail($id); |
|
|
|
])->pluck('id'); |
|
|
|
if ($ids) { |
|
|
|
$model = ParkingPatternSpace::query()->whereIn('id', $ids); |
|
|
|
$oldValue = $model->select()->get()->toArray(); |
|
|
|
$model->delete(); |
|
|
|
(new OperationLogService())->logDeleted( |
|
|
|
$model, |
|
|
|
'parking_pattern_space.delete' |
|
|
|
(new OperationLogService())->logDeletedData( |
|
|
|
new ParkingPatternSpace(), |
|
|
|
'parking_pattern_space.delete', |
|
|
|
$oldValue |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|