|
|
@@ -1199,7 +1199,7 @@ public class AccountUtils {
|
|
|
*/
|
|
|
public static UserView getUserByImId (Long imId) throws Exception {
|
|
|
String url = AccountConfig.getUserSaveUrl();
|
|
|
- UserView result = null;
|
|
|
+ UserView user = null;
|
|
|
if (!StringUtils.isEmpty(url)) {
|
|
|
HttpUtil.ResponseWrap res = HttpUtil.doGet(url,
|
|
|
new ModelMap("_operate", "getUserByImId")
|
|
|
@@ -1207,10 +1207,15 @@ public class AccountUtils {
|
|
|
if (!res.isSuccess()) {
|
|
|
throw new Exception(res.getContent());
|
|
|
} else {
|
|
|
- result = JSON.parseObject(res.getContent(), UserView.class);
|
|
|
+ ResultWrap result = JSON.parseObject(res.getContent(), ResultWrap.class);
|
|
|
+ if (!result.isSuccess()) {
|
|
|
+ throw new Exception(result.getErrMsg());
|
|
|
+ } else if (result.getContent() != null) {
|
|
|
+ user = JSON.parseObject(result.getContent().toString(), UserView.class);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- return result;
|
|
|
+ return user;
|
|
|
}
|
|
|
|
|
|
/**
|