diff --git a/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/UserResourceBO.java b/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/UserResourceBO.java index 6d60d8b..7c8b9d5 100644 --- a/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/UserResourceBO.java +++ b/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/UserResourceBO.java @@ -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 + '\'' + + '}'; } } diff --git a/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/user/UserDepartmentResourceBO.java b/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/user/UserDepartmentResourceBO.java index 5df15fc..414b78f 100644 --- a/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/user/UserDepartmentResourceBO.java +++ b/cloud-common-plugin/src/main/java/com/cm/common/plugin/pojo/bos/user/UserDepartmentResourceBO.java @@ -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 departments;