lyhzzz 5 tháng trước cách đây
mục cha
commit
522e401afd

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

@@ -527,7 +527,9 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
         }
         LambdaQueryWrapper<SceneCooperation> wrapper = new LambdaQueryWrapper<>();
         wrapper.in(SceneCooperation::getSceneNum,numList);
-        wrapper.eq(SceneCooperation::getSceneType,sceneType);
+        if(StringUtils.isNotBlank(sceneType)){
+            wrapper.eq(SceneCooperation::getSceneType,sceneType);
+        }
         List<SceneCooperation> list = this.list(wrapper);
         HashMap<String,List<User>> cooMap = new HashMap<>();
         if(list.size() >0){
@@ -537,7 +539,9 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
                 for (SceneCooperation entity : list) {
                     User user = userMap.get(entity.getUserId());
                     cooMap.computeIfAbsent(entity.getSceneNum(), k -> new ArrayList<>());
-                    cooMap.get(entity.getSceneNum()).add(user);
+                    if(!cooMap.get(entity.getSceneNum()).contains(user)){
+                        cooMap.get(entity.getSceneNum()).add(user);
+                    }
                 }
             }
         }