Commit 6b00708c authored by jiaorz's avatar jiaorz

获取用户信息bug

parent 96a51172
......@@ -72,7 +72,7 @@ public class PublicController {
, new HashSet<String>() {{add("用户名不存在!");}});
}
Integer userid = Integer.parseInt(username);
return getAppUserInfoById(userid);
return ObjectRestResponse.succ(getAppUserInfoById(userid));
}
@RequestMapping(value = "/app/userinfo-by-id", method = RequestMethod.GET)
......@@ -81,7 +81,7 @@ public class PublicController {
if (id == null) {
return ObjectRestResponse.paramIsEmpty();
}
return getAppUserInfoById(id);
return ObjectRestResponse.succ(getAppUserInfoById(id));
}
@RequestMapping(value = "/app/userinfo-by-username", method = RequestMethod.GET)
......@@ -98,15 +98,15 @@ public class PublicController {
, new HashSet<String>() {{add("用户名不存在!");}});
}
}
return getAppUserInfoById(appUserLogin.getId());
return ObjectRestResponse.succ(getAppUserInfoById(appUserLogin.getId()));
}
private ObjectRestResponse<AppUserDTO> getAppUserInfoById(Integer userid) throws IllegalAccessException, InvocationTargetException {
private AppUserDTO getAppUserInfoById(Integer userid) throws IllegalAccessException, InvocationTargetException {
AppUserDTO userDTO=new AppUserDTO();
//获取用户基础信息
AppUserVo userVo = detailBiz.getUserInfoById(userid);
if (userVo == null) {
return ObjectRestResponse.createFailedResult(ResultCode.USER_NOTEXIST_CODE, ResultCode.getMsg(ResultCode.USER_NOTEXIST_CODE));
return null;
}
Integer id= userVo.getId();
Integer positionId=userVo.getPositionId();
......@@ -123,7 +123,7 @@ public class PublicController {
userDTO.setPositionName(userPosition.getName());
}
userDTO.setId(id);
return ObjectRestResponse.succ(userDTO);
return userDTO;
}
@RequestMapping(value = "/userinfo-by-uid", method = RequestMethod.GET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment