Parcourir la source

权益绑定失败

lyhzzz il y a 2 ans
Parent
commit
4614112664

+ 7 - 5
src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

@@ -184,11 +184,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         Long totalSpace = cameraDetail.getTotalSpace();
         UserIncrement userIncrement = userIncrementService.getByCameraId(cameraId);
         if(userIncrement!=null){
-            IncrementType incrementType = incrementTypeService.getById(userIncrement.getId());
-            if(incrementType.getCameraCapacity() == -1){
-                totalSpace   = -1L;
-            }else {
-                totalSpace = incrementType.getCameraCapacity() * 1024 * 1024L;
+            IncrementType incrementType = incrementTypeService.getById(userIncrement.getIncrementTypeId());
+            if(incrementType!=null){
+                if(incrementType.getCameraCapacity() == -1){
+                    totalSpace   = -1L;
+                }else {
+                    totalSpace = incrementType.getCameraCapacity() * 1024 * 1024L;
+                }
             }
         }