lyhzzz hace 2 años
padre
commit
94866e96fe

+ 3 - 2
src/main/java/com/fdkankan/ucenter/service/impl/AppSceneService.java

@@ -123,7 +123,7 @@ public class AppSceneService {
                     continue ;
                 }
                 //相机的userId为空,表示相机的场景
-                if (cameraDetail.getUserId() == null || param.getUserId() == null || param.getCameraId() == null) {
+                if (cameraDetail.getUserId() == null || param.getUserId() == null ) {
                     record.setSceneSourceType(0);
                     continue;
                 }
@@ -132,7 +132,7 @@ public class AppSceneService {
                     record.setSceneSourceType(1);
                     continue;
                 }
-                if (cameraDetail.getCameraId().equals(param.getCameraId())) {
+                if (param.getCameraId()!=null && cameraDetail.getCameraId().equals(param.getCameraId())) {
                     if (cameraDetail.getCooperationUser() == null) {
                         //场景相机id等于该相机id
                         record.setSceneSourceType(0);
@@ -140,6 +140,7 @@ public class AppSceneService {
                         record.setSceneSourceType(2);
                     }
                 }
+
             }
 
         }