|
@@ -45,6 +45,10 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
ISceneProService sceneProService;
|
|
|
@Autowired
|
|
|
IScenePlusService scenePlusService;
|
|
|
+ @Autowired
|
|
|
+ IUserIncrementService userIncrementService;
|
|
|
+ @Autowired
|
|
|
+ IIncrementTypeService incrementTypeService;
|
|
|
|
|
|
@Override
|
|
|
public CameraDetail getByCameraId(Long cameraId) {
|
|
@@ -222,4 +226,15 @@ public class CameraDetailServiceImpl extends ServiceImpl<ICameraDetailMapper, Ca
|
|
|
.set(CameraDetail::getUsedSpace,cameraDetailSpace);
|
|
|
this.update(wrapper);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long getTotalSpaceByCameraId(Long cameraId) {
|
|
|
+ UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
|
|
|
+ if(userIncrement != null && userIncrement.getIsExpired() == 0){
|
|
|
+ Integer incrementTypeId = userIncrement.getIncrementTypeId();
|
|
|
+ IncrementType incrementType = incrementTypeService.getById(incrementTypeId);
|
|
|
+ return incrementType.getCameraCapacity() * 1024 *1024 *1024L;
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|