|
@@ -253,6 +253,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getByPlusId(scenePlus.getId());
|
|
|
space = scenePlusExt.getSpace();
|
|
|
}
|
|
|
+ space = space == null ? 0 :space;
|
|
|
Long newUseSpace = space + cameraDetail.getUsedSpace();
|
|
|
if(newUseSpace > cameraDetail.getTotalSpace()){
|
|
|
throw new BusinessException(-1,"相机容量不足,不能迁移");
|
|
@@ -261,7 +262,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
if(oldCamera == null){
|
|
|
throw new BusinessException(-1,"旧相机不存在");
|
|
|
}
|
|
|
- CameraDetail oldCameraDetail = cameraDetailService.getByCameraId(camera.getId());
|
|
|
+ CameraDetail oldCameraDetail = cameraDetailService.getByCameraId(oldCamera.getId());
|
|
|
if(oldCameraDetail == null){
|
|
|
throw new BusinessException(-1,"旧相机不存在。");
|
|
|
}
|