添加资源用户字段

This commit is contained in:
wanggeng888 2021-01-20 12:36:30 +08:00
parent e15d9d810a
commit e0dbaa1172
2 changed files with 18 additions and 13 deletions

View File

@ -20,6 +20,7 @@ public class UserResourceBO implements Serializable {
private String userName; private String userName;
private String userPhone; private String userPhone;
private String userEmail; private String userEmail;
private String userAvatar;
public void setUserId(String userId) { public void setUserId(String userId) {
this.userId = userId; this.userId = userId;
@ -61,20 +62,23 @@ public class UserResourceBO implements Serializable {
this.userEmail = userEmail; this.userEmail = userEmail;
} }
public String getUserAvatar() {
return userAvatar == null ? "" : userId.trim();
}
public void setUserAvatar(String userAvatar) {
this.userAvatar = userAvatar;
}
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder("{"); return "UserResourceBO{" +
sb.append("\"userId\":\"") "userId='" + userId + '\'' +
.append(userId).append('\"'); ", userUsername='" + userUsername + '\'' +
sb.append(",\"userUsername\":\"") ", userName='" + userName + '\'' +
.append(userUsername).append('\"'); ", userPhone='" + userPhone + '\'' +
sb.append(",\"userName\":\"") ", userEmail='" + userEmail + '\'' +
.append(userName).append('\"'); ", userAvatar='" + userAvatar + '\'' +
sb.append(",\"userPhone\":\"") '}';
.append(userPhone).append('\"');
sb.append(",\"userEmail\":\"")
.append(userEmail).append('\"');
sb.append('}');
return sb.toString();
} }
} }

View File

@ -29,6 +29,7 @@ public class UserDepartmentResourceBO extends UserResourceBO {
super.setUserName(userResourceBO.getUserName()); super.setUserName(userResourceBO.getUserName());
super.setUserPhone(userResourceBO.getUserPhone()); super.setUserPhone(userResourceBO.getUserPhone());
super.setUserEmail(userResourceBO.getUserEmail()); super.setUserEmail(userResourceBO.getUserEmail());
super.setUserAvatar(userResourceBO.getUserAvatar());
} }
private List<DepartmentResourceBO> departments; private List<DepartmentResourceBO> departments;