lyhzzz 2 년 전
부모
커밋
68188c2c29
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/main/java/com/fdkankan/ucenter/service/impl/SceneProServiceImpl.java

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

@@ -692,7 +692,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             HashMap<Long, ScenePlusExt> plusMap = scenePlusExtService.getByPlusIds(plusIds);
             HashMap<Long, ScenePlusExt> plusMap = scenePlusExtService.getByPlusIds(plusIds);
 
 
             for (ScenePlus scenePlus : plusList) {
             for (ScenePlus scenePlus : plusList) {
-                cameraMap.merge(scenePlus.getCameraId(), plusMap.get(scenePlus.getId()).getSpace(), Long::sum);
+                if(scenePlus.getCameraId()!= null && plusMap.get(scenePlus.getId())!=null){
+                    cameraMap.merge(scenePlus.getCameraId(), plusMap.get(scenePlus.getId()).getSpace(), Long::sum);
+                }
             }
             }
             scenePlusService.removeByIds(plusIds);
             scenePlusService.removeByIds(plusIds);
         }
         }