|
|
@ -39,7 +39,7 @@ class AdminFloorRegionService extends BaseService |
|
|
['floor_id', '=', $data['floor_id']] |
|
|
['floor_id', '=', $data['floor_id']] |
|
|
]; |
|
|
]; |
|
|
if (AdminFloorRegion::query()->where($existsWhere)->exists()) { |
|
|
if (AdminFloorRegion::query()->where($existsWhere)->exists()) { |
|
|
throw new Exception(__('service.admin_floor.name_exists')); |
|
|
throw new Exception(__('service.admin_floor_region.name_exists')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
$model = AdminFloorRegion::query()->create([ |
|
|
$model = AdminFloorRegion::query()->create([ |
|
|
@ -85,7 +85,7 @@ class AdminFloorRegionService extends BaseService |
|
|
['id', '<>', $id] |
|
|
['id', '<>', $id] |
|
|
]; |
|
|
]; |
|
|
if (AdminFloorRegion::query()->where($existsWhere)->exists()) { |
|
|
if (AdminFloorRegion::query()->where($existsWhere)->exists()) { |
|
|
throw new Exception(__('service.admin_role.name_exists')); |
|
|
throw new Exception(__('service.admin_floor_region.name_exists')); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 更新 |
|
|
// 更新 |
|
|
@ -138,6 +138,8 @@ class AdminFloorRegionService extends BaseService |
|
|
|
|
|
|
|
|
$model->delete(); |
|
|
$model->delete(); |
|
|
|
|
|
|
|
|
|
|
|
AdminTranslationService::syncDelete($id, 5); |
|
|
|
|
|
|
|
|
DB::commit(); |
|
|
DB::commit(); |
|
|
return true; |
|
|
return true; |
|
|
} catch (Exception $e) { |
|
|
} catch (Exception $e) { |
|
|
|