|
|
@@ -339,31 +339,31 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
@Override
|
|
|
public int getPayStatus(Long cameraId, Long space, JSONObject dataFdageJson){
|
|
|
//查询权益统计容量的方式
|
|
|
- String unit = SpaceType.GB.code();
|
|
|
- CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
|
|
|
- if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
|
|
|
- unit = cameraDetail.getUnit();
|
|
|
- }
|
|
|
- Long limit = this.getSpaceLimit(cameraDetail);
|
|
|
-
|
|
|
- if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
|
|
|
- space = 1L;
|
|
|
- }
|
|
|
-
|
|
|
- //更新相机使用用量,非激光相机或者是空间个数计算方式的,需要叠加相机容量
|
|
|
- cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
|
|
|
-
|
|
|
- //无限容量或者激光相机或者文保vr,直接返回已支付
|
|
|
- if(limit == -1
|
|
|
- || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))
|
|
|
- || this.checkIsSpVr(dataFdageJson, cameraDetail)){
|
|
|
- return PayStatus.PAY.code();
|
|
|
- }
|
|
|
-
|
|
|
- Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
|
|
|
- if(usedSpace + space > limit){
|
|
|
- return PayStatus.NO_CAPACITY.code();
|
|
|
- }
|
|
|
+// String unit = SpaceType.GB.code();
|
|
|
+// CameraDetail cameraDetail = cameraDetailService.getByCameraId(cameraId);
|
|
|
+// if(StrUtil.isNotEmpty(cameraDetail.getUnit())){
|
|
|
+// unit = cameraDetail.getUnit();
|
|
|
+// }
|
|
|
+// Long limit = this.getSpaceLimit(cameraDetail);
|
|
|
+//
|
|
|
+// if(SpaceType.SP.code().equals(unit)){//如果按空间方式统计,则space置为1
|
|
|
+// space = 1L;
|
|
|
+// }
|
|
|
+//
|
|
|
+// //更新相机使用用量,非激光相机或者是空间个数计算方式的,需要叠加相机容量
|
|
|
+// cameraDetailService.updateCameraDetailByCameraIdAndSpace(cameraId, space);
|
|
|
+//
|
|
|
+// //无限容量或者激光相机或者文保vr,直接返回已支付
|
|
|
+// if(limit == -1
|
|
|
+// || ("gn".equals(env) && CollUtil.isNotEmpty(laserCamTypeList) && laserCamTypeList.contains(cameraDetail.getType()))
|
|
|
+// || this.checkIsSpVr(dataFdageJson, cameraDetail)){
|
|
|
+// return PayStatus.PAY.code();
|
|
|
+// }
|
|
|
+//
|
|
|
+// Long usedSpace = cameraService.getUsedSpace(cameraId, unit);
|
|
|
+// if(usedSpace + space > limit){
|
|
|
+// return PayStatus.NO_CAPACITY.code();
|
|
|
+// }
|
|
|
|
|
|
return PayStatus.PAY.code();
|
|
|
}
|