|
@@ -320,12 +320,12 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
if("GB".equals(cameraDetail.getUnit())){
|
|
|
Long proSpace = sceneProService.getSpaceSumByCameraId(cameraDetail.getCameraId());
|
|
|
Long plusSpace = scenePlusService.getSpaceSumByCameraId(cameraDetail.getCameraId());
|
|
|
- wrapper.set(CameraDetail::getUsedSpace,plusSpace + proSpace);
|
|
|
+ wrapper.set(CameraDetail::getUsedSpace,(plusSpace == null ?0L:plusSpace) + (proSpace == null ?0L:proSpace));
|
|
|
}
|
|
|
if("SP".equals(cameraDetail.getUnit())){
|
|
|
Long proSpace = sceneProService.getCountByCameraId(cameraDetail.getCameraId());
|
|
|
Long plusSpace = scenePlusService.getCountByCameraId(cameraDetail.getCameraId());
|
|
|
- wrapper.set(CameraDetail::getUsedSpace,plusSpace + proSpace);
|
|
|
+ wrapper.set(CameraDetail::getUsedSpace,(plusSpace == null ?0L:plusSpace )+( proSpace == null ?0L:proSpace));
|
|
|
}
|
|
|
this.update(wrapper);
|
|
|
}
|