lyhzzz 1 سال پیش
والد
کامیت
1097316bcd

+ 4 - 10
src/main/java/com/fdkankan/ucenter/service/impl/CameraServiceImpl.java

@@ -237,16 +237,10 @@ public class CameraServiceImpl extends ServiceImpl<ICameraMapper, Camera> implem
             }
 
 
-            if(responseCamera.getType() == 10){
-                Map<String, String> params = new HashMap<>();
-                params.put("snCode", responseCamera.getSnCode());
-                responseCamera.setSceneNum(fdkkLaserService.getLaserSceneNum(params));
-            }else{
-                Integer sceneNum = sceneNumMap.get(responseCamera.getId()) == null ? 0 : Math.toIntExact(sceneNumMap.get(responseCamera.getId()).getCount());
-                String lastTime = sceneNumMap.get(responseCamera.getId()) == null ? "" : sceneNumMap.get(responseCamera.getId()).getLastTime();
-                responseCamera.setSceneNum(sceneNum);
-                responseCamera.setLastTime(lastTime);
-            }
+            Integer sceneNum = sceneNumMap.get(responseCamera.getId()) == null ? 0 : Math.toIntExact(sceneNumMap.get(responseCamera.getId()).getCount());
+            String lastTime = sceneNumMap.get(responseCamera.getId()) == null ? "" : sceneNumMap.get(responseCamera.getId()).getLastTime();
+            responseCamera.setSceneNum(sceneNum);
+            responseCamera.setLastTime(lastTime);
         }
         return PageInfo.PageInfo(page);
     }

+ 3 - 1
src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusServiceImpl.java

@@ -94,7 +94,9 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
     @Override
     public List<ScenePlus> getListByUserId(Long userId,Long cameraId) {
         LambdaQueryWrapper<ScenePlus> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(ScenePlus::getUserId,userId);
+        if(userId !=null){
+            wrapper.eq(ScenePlus::getUserId,userId);
+        }
         wrapper.eq(ScenePlus::getCameraId,cameraId);
         return this.list(wrapper);
     }