添加资源用户字段

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

View File

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