添加登录用户头像字段

This commit is contained in:
wanggeng888 2021-01-20 18:48:11 +08:00
parent bca839bfcf
commit 6ee3e79c75
4 changed files with 78 additions and 57 deletions

View File

@ -63,7 +63,7 @@ public class UserResourceBO implements Serializable {
} }
public String getUserAvatar() { public String getUserAvatar() {
return userAvatar == null ? "" : userId.trim(); return userAvatar == null ? "" : userAvatar.trim();
} }
public void setUserAvatar(String userAvatar) { public void setUserAvatar(String userAvatar) {

View File

@ -42,6 +42,8 @@ public class SecurityComponent {
userInfoBO.setUserUsername(userBO.getUsername()); userInfoBO.setUserUsername(userBO.getUsername());
userInfoBO.setUserName(userBO.getUserName()); userInfoBO.setUserName(userBO.getUserName());
userInfoBO.setUserPhone(userBO.getUserPhone()); userInfoBO.setUserPhone(userBO.getUserPhone());
userInfoBO.setUserAvatar(userBO.getUserAvatar());
userInfoBO.setUserEmail(userBO.getUserEmail());
userInfoBO.setDataAuthority(userBO.getDataAuthority()); userInfoBO.setDataAuthority(userBO.getDataAuthority());
userInfoBO.setDataAuthorityUserIds(userBO.getDataAuthorityUserIds()); userInfoBO.setDataAuthorityUserIds(userBO.getDataAuthorityUserIds());
userInfoBO.setBaseDepartmentIds(userBO.getBaseDepartmentIds()); userInfoBO.setBaseDepartmentIds(userBO.getBaseDepartmentIds());

View File

@ -19,6 +19,8 @@ public class UserBO extends User {
private String userId; private String userId;
private String userName; private String userName;
private String userPhone; private String userPhone;
private String userAvatar;
private String userEmail;
private String userUKey; private String userUKey;
private Integer loginType; private Integer loginType;
private String dataAuthority; private String dataAuthority;
@ -69,6 +71,22 @@ public class UserBO extends User {
this.userPhone = userPhone; this.userPhone = userPhone;
} }
public String getUserAvatar() {
return userAvatar == null ? "" : userAvatar;
}
public void setUserAvatar(String userAvatar) {
this.userAvatar = userAvatar;
}
public String getUserEmail() {
return userEmail == null ? "" : userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getUserUKey() { public String getUserUKey() {
return userUKey == null ? "" : userUKey.trim(); return userUKey == null ? "" : userUKey.trim();
} }
@ -215,40 +233,25 @@ public class UserBO extends User {
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder("{"); return "UserBO{" +
sb.append("\"userId\":") "userId='" + userId + '\'' +
.append("\"").append(userId).append("\""); ", userName='" + userName + '\'' +
sb.append(",\"userName\":") ", userPhone='" + userPhone + '\'' +
.append("\"").append(userName).append("\""); ", userAvatar='" + userAvatar + '\'' +
sb.append(",\"userPhone\":") ", userEmail='" + userEmail + '\'' +
.append("\"").append(userPhone).append("\""); ", userUKey='" + userUKey + '\'' +
sb.append(",\"userUKey\":") ", loginType=" + loginType +
.append("\"").append(userUKey).append("\""); ", dataAuthority='" + dataAuthority + '\'' +
sb.append(",\"loginType\":") ", baseDepartmentIds=" + baseDepartmentIds +
.append(loginType); ", dataAuthorityUserIds=" + dataAuthorityUserIds +
sb.append(",\"dataAuthority\":") ", roles=" + roles +
.append("\"").append(dataAuthority).append("\""); ", groups=" + groups +
sb.append(",\"baseDepartmentIds\":") ", departments=" + departments +
.append(baseDepartmentIds); ", positions=" + positions +
sb.append(",\"dataAuthorityUserIds\":") ", roleIdAndNamesValue='" + roleIdAndNamesValue + '\'' +
.append(dataAuthorityUserIds); ", groupIdAndNamesValue='" + groupIdAndNamesValue + '\'' +
sb.append(",\"roles\":") ", departmentIdAndNamesValue='" + departmentIdAndNamesValue + '\'' +
.append(roles); ", positionIdAndNamesValue='" + positionIdAndNamesValue + '\'' +
sb.append(",\"groups\":") '}';
.append(groups);
sb.append(",\"departments\":")
.append(departments);
sb.append(",\"positions\":")
.append(positions);
sb.append(",\"roleIdAndNamesValue\":")
.append("\"").append(roleIdAndNamesValue).append("\"");
sb.append(",\"groupIdAndNamesValue\":")
.append("\"").append(groupIdAndNamesValue).append("\"");
sb.append(",\"departmentIdAndNamesValue\":")
.append("\"").append(departmentIdAndNamesValue).append("\"");
sb.append(",\"positionIdAndNamesValue\":")
.append("\"").append(positionIdAndNamesValue).append("\"");
sb.append('}');
return sb.toString();
} }
} }

View File

@ -16,6 +16,8 @@ public class UserInfoBO {
private String userUsername; private String userUsername;
private String userName; private String userName;
private String userPhone; private String userPhone;
private String userAvatar;
private String userEmail;
private String dataAuthority; private String dataAuthority;
private List<String> dataAuthorityUserIds; private List<String> dataAuthorityUserIds;
private List<String> baseDepartmentIds; private List<String> baseDepartmentIds;
@ -60,6 +62,22 @@ public class UserInfoBO {
this.userPhone = userPhone; this.userPhone = userPhone;
} }
public String getUserAvatar() {
return userAvatar == null ? "" : userAvatar;
}
public void setUserAvatar(String userAvatar) {
this.userAvatar = userAvatar;
}
public String getUserEmail() {
return userEmail == null ? "" : userEmail;
}
public void setUserEmail(String userEmail) {
this.userEmail = userEmail;
}
public String getDataAuthority() { public String getDataAuthority() {
return dataAuthority == null ? "" : dataAuthority.trim(); return dataAuthority == null ? "" : dataAuthority.trim();
} }
@ -190,26 +208,24 @@ public class UserInfoBO {
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder("{"); return "UserInfoBO{" +
sb.append("\"userId\":\"") "userId='" + userId + '\'' +
.append(userId).append('\"'); ", userUsername='" + userUsername + '\'' +
sb.append(",\"userUsername\":\"") ", userName='" + userName + '\'' +
.append(userUsername).append('\"'); ", userPhone='" + userPhone + '\'' +
sb.append(",\"userName\":\"") ", userAvatar='" + userAvatar + '\'' +
.append(userName).append('\"'); ", userEmail='" + userEmail + '\'' +
sb.append(",\"userPhone\":\"") ", dataAuthority='" + dataAuthority + '\'' +
.append(userPhone).append('\"'); ", dataAuthorityUserIds=" + dataAuthorityUserIds +
sb.append(",\"dataAuthority\":\"") ", baseDepartmentIds=" + baseDepartmentIds +
.append(dataAuthority).append('\"'); ", departments=" + departments +
sb.append(",\"dataAuthorityUserIds\":") ", roles=" + roles +
.append(dataAuthorityUserIds); ", groups=" + groups +
sb.append(",\"baseDepartmentIds\":") ", positions=" + positions +
.append(baseDepartmentIds); ", roleIdAndNamesValue='" + roleIdAndNamesValue + '\'' +
sb.append(",\"departments\":") ", groupIdAndNamesValue='" + groupIdAndNamesValue + '\'' +
.append(departments); ", departmentIdAndNamesValue='" + departmentIdAndNamesValue + '\'' +
sb.append(",\"roles\":") ", positionIdAndNamesValue='" + positionIdAndNamesValue + '\'' +
.append(roles); '}';
sb.append('}');
return sb.toString();
} }
} }