Commit 58ede5e5 by 杨林龙

toMAp添加保护

1 parent 0f292767
......@@ -52,7 +52,7 @@ public class RemoteCUserService {
public Map<Long, CUser> getLocalUserMap(Collection<Long> cuserIds) {
List<CUser> userModelList = this.getLocalUsers(cuserIds);
return userModelList.stream().collect(Collectors.toMap(CUser::getUserId, Function.identity()));
return userModelList.stream().collect(Collectors.toMap(CUser::getUserId, Function.identity(), (o, n) -> n));
}
/**
......@@ -78,7 +78,7 @@ public class RemoteCUserService {
public Map<Long, CUser> getLocalRelUserMap(Collection<Long> relUserIds) {
List<CUser> userModelList = this.getLocalRelUsers(relUserIds);
return userModelList.stream().filter(um -> um.getRelUserId() != null).collect(Collectors.toMap(CUser::getRelUserId, Function.identity()));
return userModelList.stream().filter(um -> um.getRelUserId() != null).collect(Collectors.toMap(CUser::getRelUserId, Function.identity(), (o, n) -> n));
}
/**
......@@ -108,7 +108,7 @@ public class RemoteCUserService {
public Map<Long, CUser> getWechatUserMap(Collection<Long> cuserIds) {
List<CUser> userModelList = this.getWechatUsers(cuserIds);
return userModelList.stream().collect(Collectors.toMap(CUser::getUserId, Function.identity()));
return userModelList.stream().collect(Collectors.toMap(CUser::getUserId, Function.identity(), (o, n) -> n));
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!