|
@@ -328,9 +328,11 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
}
|
|
}
|
|
space = space == null ? 0 :space;
|
|
space = space == null ? 0 :space;
|
|
Long newUseSpace = space + cameraDetail.getUsedSpace();
|
|
Long newUseSpace = space + cameraDetail.getUsedSpace();
|
|
- if(newUseSpace > cameraDetail.getTotalSpace()){
|
|
|
|
|
|
+ Long count = userIncrementService.getValidCountByCameraId(cameraId);
|
|
|
|
+ if(count<=0 && newUseSpace > cameraDetail.getTotalSpace()){
|
|
throw new BusinessException(ResultCode.CAMERA_SPACE_ERROR);
|
|
throw new BusinessException(ResultCode.CAMERA_SPACE_ERROR);
|
|
}
|
|
}
|
|
|
|
+
|
|
Camera oldCamera = cameraService.getById(cameraId);
|
|
Camera oldCamera = cameraService.getById(cameraId);
|
|
if(oldCamera == null){
|
|
if(oldCamera == null){
|
|
throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
|
|
throw new BusinessException(ResultCode.CAMERA_NOT_EXIST);
|