lyhzzz 5 months ago
parent
commit
7c5ee3b15c

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

@@ -412,13 +412,13 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
             List<User> dbUserList = map.get(num);
             if(dbUserList != null && !dbUserList.isEmpty()){
                 if(cameraId != null){
-                    freeCount = dbUserList.size() > freeCount ? dbUserList.size() :  freeCount - dbUserList.size() ;
+                    freeCount = (dbUserList.size() > freeCount ? dbUserList.size() :  freeCount - dbUserList.size());
                 }else {
-                    freeCount = dbUserList.size() > freeCount ? dbUserList.size() : freeCount ;
+                    freeCount = (dbUserList.size() > freeCount ? dbUserList.size() : freeCount) ;
                 }
             }
 
-            totalCount +=  users.size() - freeCount ;
+            totalCount +=  (users.size() - freeCount );
 
         }
         if(totalCount <=0){