提交 1c81a776 authored 作者: 黄承天's avatar 黄承天

fix(user):修正字段以及增加异常处理

上级 e4124636
...@@ -81,9 +81,12 @@ public class UserService { ...@@ -81,9 +81,12 @@ public class UserService {
User user = userMapper.selectById(userId); User user = userMapper.selectById(userId);
if (nonNull(user)) { if (nonNull(user)) {
return userInfo(user); return userInfo(user);
} else {
throw new RuntimeException(String.format("未找到id为%s的用户", userId));
} }
} else {
throw new RuntimeException("当前没有已登录的用户");
} }
return new UserInfo();
} }
/** /**
......
...@@ -21,9 +21,6 @@ import lombok.*; ...@@ -21,9 +21,6 @@ import lombok.*;
@ApiModel(value = "ZtUserview对象", description = "") @ApiModel(value = "ZtUserview对象", description = "")
public class ZtUserView { public class ZtUserView {
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
private String account; private String account;
private String programs; private String programs;
...@@ -34,5 +31,4 @@ public class ZtUserView { ...@@ -34,5 +31,4 @@ public class ZtUserView {
private String sprints; private String sprints;
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论