|
@@ -95,7 +95,13 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
@Override
|
|
@Override
|
|
public HttpRespMsg getUserInfo(String id) {
|
|
public HttpRespMsg getUserInfo(String id) {
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
HttpRespMsg httpRespMsg = new HttpRespMsg();
|
|
- httpRespMsg.data = userMapper.selectById(id);
|
|
|
|
|
|
+ User user = userMapper.selectById(id);
|
|
|
|
+ if (user == null) {
|
|
|
|
+ httpRespMsg.setError("未查询到用户信息");
|
|
|
|
+ } else {
|
|
|
|
+ httpRespMsg.data = user;
|
|
|
|
+ }
|
|
|
|
+
|
|
return httpRespMsg;
|
|
return httpRespMsg;
|
|
}
|
|
}
|
|
|
|
|