2021-01-25 12:31:40 +08:00
|
|
|
package ink.wgink.pojo.bos;
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
import ink.wgink.pojo.pos.DepartmentPO;
|
|
|
|
import ink.wgink.pojo.pos.GroupPO;
|
|
|
|
import ink.wgink.pojo.pos.PositionPO;
|
|
|
|
import ink.wgink.pojo.pos.RolePO;
|
|
|
|
|
2021-01-25 12:31:40 +08:00
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ClassName: UserInfoBO
|
|
|
|
* @Description: 用户
|
|
|
|
* @Author: WangGeng
|
|
|
|
* @Date: 2019/3/24 11:03 PM
|
|
|
|
* @Version: 1.0
|
|
|
|
**/
|
|
|
|
public class UserInfoBO {
|
|
|
|
|
|
|
|
private String userId;
|
|
|
|
private String userUsername;
|
|
|
|
private String userName;
|
|
|
|
private String userPhone;
|
|
|
|
private String userAvatar;
|
|
|
|
private String userEmail;
|
2021-02-25 23:23:47 +08:00
|
|
|
private String dataRight;
|
|
|
|
private List<String> dataUserIds;
|
|
|
|
private List<String> rootDepartmentIds;
|
|
|
|
private List<DepartmentPO> departments;
|
|
|
|
private List<RolePO> roles;
|
|
|
|
private List<GroupPO> groups;
|
|
|
|
private List<PositionPO> positions;
|
2021-01-25 12:31:40 +08:00
|
|
|
private String roleIdAndNamesValue;
|
|
|
|
private String groupIdAndNamesValue;
|
|
|
|
private String departmentIdAndNamesValue;
|
|
|
|
private String positionIdAndNamesValue;
|
2021-05-02 10:18:25 +08:00
|
|
|
private Object expandData;
|
2021-01-25 12:31:40 +08:00
|
|
|
|
|
|
|
public String getUserId() {
|
|
|
|
return userId == null ? "" : userId.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserId(String userId) {
|
|
|
|
this.userId = userId;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUserUsername() {
|
|
|
|
return userUsername == null ? "" : userUsername.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserUsername(String userUsername) {
|
|
|
|
this.userUsername = userUsername;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUserName() {
|
|
|
|
return userName == null ? "" : userName.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserName(String userName) {
|
|
|
|
this.userName = userName;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUserPhone() {
|
|
|
|
return userPhone == null ? "" : userPhone.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserPhone(String 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;
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public String getDataRight() {
|
|
|
|
return dataRight == null ? "" : dataRight.trim();
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setDataRight(String dataRight) {
|
|
|
|
this.dataRight = dataRight;
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<String> getDataUserIds() {
|
|
|
|
return dataUserIds == null ? new ArrayList<>(0) : dataUserIds;
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setDataUserIds(List<String> dataUserIds) {
|
|
|
|
this.dataUserIds = dataUserIds;
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<String> getRootDepartmentIds() {
|
|
|
|
return rootDepartmentIds == null ? new ArrayList<>(0) : rootDepartmentIds;
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setRootDepartmentIds(List<String> rootDepartmentIds) {
|
|
|
|
this.rootDepartmentIds = rootDepartmentIds;
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<DepartmentPO> getDepartments() {
|
2021-01-25 12:31:40 +08:00
|
|
|
return departments == null ? new ArrayList<>(0) : departments;
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setDepartments(List<DepartmentPO> departments) {
|
2021-01-25 12:31:40 +08:00
|
|
|
this.departments = departments;
|
|
|
|
if (departments == null || departments.isEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
StringBuilder idSB = new StringBuilder();
|
|
|
|
StringBuilder nameSB = new StringBuilder();
|
|
|
|
departments.forEach(departmentBO -> {
|
|
|
|
if (idSB.length() > 0) {
|
|
|
|
idSB.append(",");
|
|
|
|
nameSB.append(",");
|
|
|
|
}
|
|
|
|
idSB.append(departmentBO.getDepartmentId());
|
|
|
|
nameSB.append(departmentBO.getDepartmentName());
|
|
|
|
});
|
|
|
|
this.departmentIdAndNamesValue = idSB.append("|").append(nameSB).toString();
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<RolePO> getRoles() {
|
2021-01-25 12:31:40 +08:00
|
|
|
return roles == null ? new ArrayList<>(0) : roles;
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setRoles(List<RolePO> roles) {
|
2021-01-25 12:31:40 +08:00
|
|
|
this.roles = roles;
|
|
|
|
if (roles == null || roles.isEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
StringBuilder idSB = new StringBuilder();
|
|
|
|
StringBuilder nameSB = new StringBuilder();
|
|
|
|
roles.forEach(roleBO -> {
|
|
|
|
if (idSB.length() > 0) {
|
|
|
|
idSB.append(",");
|
|
|
|
nameSB.append(",");
|
|
|
|
}
|
|
|
|
idSB.append(roleBO.getRoleId());
|
|
|
|
nameSB.append(roleBO.getRoleName());
|
|
|
|
});
|
|
|
|
this.roleIdAndNamesValue = idSB.append("|").append(nameSB).toString();
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<GroupPO> getGroups() {
|
2021-01-25 12:31:40 +08:00
|
|
|
return groups == null ? new ArrayList<>(0) : groups;
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setGroups(List<GroupPO> groups) {
|
2021-01-25 12:31:40 +08:00
|
|
|
this.groups = groups;
|
|
|
|
if (groups == null || groups.isEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
StringBuilder idSB = new StringBuilder();
|
|
|
|
StringBuilder nameSB = new StringBuilder();
|
|
|
|
groups.forEach(groupBO -> {
|
|
|
|
if (idSB.length() > 0) {
|
|
|
|
idSB.append(",");
|
|
|
|
nameSB.append(",");
|
|
|
|
}
|
|
|
|
idSB.append(groupBO.getGroupId());
|
|
|
|
nameSB.append(groupBO.getGroupName());
|
|
|
|
});
|
|
|
|
this.groupIdAndNamesValue = idSB.append("|").append(nameSB).toString();
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public List<PositionPO> getPositions() {
|
2021-01-25 12:31:40 +08:00
|
|
|
return positions == null ? new ArrayList<>(0) : positions;
|
|
|
|
}
|
|
|
|
|
2021-02-25 23:23:47 +08:00
|
|
|
public void setPositions(List<PositionPO> positions) {
|
2021-01-25 12:31:40 +08:00
|
|
|
this.positions = positions;
|
|
|
|
if (positions == null || positions.isEmpty()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
StringBuilder idSB = new StringBuilder();
|
|
|
|
StringBuilder nameSB = new StringBuilder();
|
|
|
|
positions.forEach(positionBO -> {
|
|
|
|
if (idSB.length() > 0) {
|
|
|
|
idSB.append(",");
|
|
|
|
nameSB.append(",");
|
|
|
|
}
|
|
|
|
idSB.append(positionBO.getPositionId());
|
|
|
|
nameSB.append(positionBO.getPositionName());
|
|
|
|
});
|
|
|
|
this.positionIdAndNamesValue = idSB.append("|").append(nameSB).toString();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getRoleIdAndNamesValue() {
|
|
|
|
return roleIdAndNamesValue == null ? "" : roleIdAndNamesValue.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getGroupIdAndNamesValue() {
|
|
|
|
return groupIdAndNamesValue == null ? "" : groupIdAndNamesValue.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDepartmentIdAndNamesValue() {
|
|
|
|
return departmentIdAndNamesValue == null ? "" : departmentIdAndNamesValue.trim();
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getPositionIdAndNamesValue() {
|
|
|
|
return positionIdAndNamesValue == null ? "" : positionIdAndNamesValue.trim();
|
|
|
|
}
|
|
|
|
|
2021-05-02 10:18:25 +08:00
|
|
|
public Object getExpandData() {
|
|
|
|
return expandData;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setExpandData(Object expandData) {
|
|
|
|
this.expandData = expandData;
|
|
|
|
}
|
|
|
|
|
2021-01-25 12:31:40 +08:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2021-05-02 10:18:25 +08:00
|
|
|
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(",\"userAvatar\":\"")
|
|
|
|
.append(userAvatar).append('\"');
|
|
|
|
sb.append(",\"userEmail\":\"")
|
|
|
|
.append(userEmail).append('\"');
|
|
|
|
sb.append(",\"dataRight\":\"")
|
|
|
|
.append(dataRight).append('\"');
|
|
|
|
sb.append(",\"dataUserIds\":")
|
|
|
|
.append(dataUserIds);
|
|
|
|
sb.append(",\"rootDepartmentIds\":")
|
|
|
|
.append(rootDepartmentIds);
|
|
|
|
sb.append(",\"departments\":")
|
|
|
|
.append(departments);
|
|
|
|
sb.append(",\"roles\":")
|
|
|
|
.append(roles);
|
|
|
|
sb.append(",\"groups\":")
|
|
|
|
.append(groups);
|
|
|
|
sb.append(",\"positions\":")
|
|
|
|
.append(positions);
|
|
|
|
sb.append(",\"roleIdAndNamesValue\":\"")
|
|
|
|
.append(roleIdAndNamesValue).append('\"');
|
|
|
|
sb.append(",\"groupIdAndNamesValue\":\"")
|
|
|
|
.append(groupIdAndNamesValue).append('\"');
|
|
|
|
sb.append(",\"departmentIdAndNamesValue\":\"")
|
|
|
|
.append(departmentIdAndNamesValue).append('\"');
|
|
|
|
sb.append(",\"positionIdAndNamesValue\":\"")
|
|
|
|
.append(positionIdAndNamesValue).append('\"');
|
|
|
|
sb.append(",\"expandData\":")
|
|
|
|
.append(expandData);
|
|
|
|
sb.append('}');
|
|
|
|
return sb.toString();
|
2021-01-25 12:31:40 +08:00
|
|
|
}
|
|
|
|
}
|