Authored by tanling

bug fix

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired; @@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
19 import org.springframework.beans.factory.annotation.Value; 19 import org.springframework.beans.factory.annotation.Value;
20 import org.springframework.stereotype.Service; 20 import org.springframework.stereotype.Service;
21 21
  22 +import java.util.Arrays;
22 import java.util.List; 23 import java.util.List;
23 import java.util.Map; 24 import java.util.Map;
24 import java.util.Objects; 25 import java.util.Objects;
@@ -164,11 +165,11 @@ public class UserProxyService { @@ -164,11 +165,11 @@ public class UserProxyService {
164 Map<String,Object> params = Maps.newHashMap(); 165 Map<String,Object> params = Maps.newHashMap();
165 params.put("uids", uids.stream().map(String::valueOf).collect(Collectors.joining(","))); 166 params.put("uids", uids.stream().map(String::valueOf).collect(Collectors.joining(",")));
166 167
167 - List<UserInfoRspBO> userInfo ; 168 + UserInfoRspBO[] userInfo ;
168 try { 169 try {
169 userInfo = serviceCaller.get("uic.getNickName", url, params, 170 userInfo = serviceCaller.get("uic.getNickName", url, params,
170 - List.class, null).get(500, TimeUnit.MILLISECONDS);  
171 - Map<Integer, String> nickNameMap = userInfo.stream().collect(Collectors.toMap(UserInfoRspBO::getYohoUid, UserInfoRspBO::getNickName)); 171 + UserInfoRspBO[].class, null).get(500, TimeUnit.MILLISECONDS);
  172 + Map<Integer, String> nickNameMap = Arrays.stream(userInfo).collect(Collectors.toMap(UserInfoRspBO::getYohoUid, UserInfoRspBO::getNickName));
172 return nickNameMap; 173 return nickNameMap;
173 174
174 }catch (Exception ex){ 175 }catch (Exception ex){