|
@@ -121,18 +121,20 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
for (Long userId : userIds) {
|
|
|
for (String num : numList) {
|
|
|
List<User> users = byNumList.get(num);
|
|
|
- List<Long> collect1 = users.stream().map(User::getId).collect(Collectors.toList());
|
|
|
- if("scene".equals(type)){
|
|
|
- for (Long l : collect1) {
|
|
|
- if(!userIds.contains(l)){
|
|
|
- delList.add(num + "," +l);
|
|
|
+ if(users != null && !users.isEmpty()){
|
|
|
+ List<Long> collect1 = users.stream().map(User::getId).collect(Collectors.toList());
|
|
|
+ if("scene".equals(type)){
|
|
|
+ for (Long l : collect1) {
|
|
|
+ if(!userIds.contains(l)){
|
|
|
+ delList.add(num + "," +l);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ if(collect1.contains(userId)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if(collect1.contains(userId)){
|
|
|
- continue;
|
|
|
- }
|
|
|
SceneCooperation sceneCooperationEntity = new SceneCooperation();
|
|
|
sceneCooperationEntity.setUserId(userId);
|
|
|
sceneCooperationEntity.setSceneNum(num);
|