处理问题
This commit is contained in:
parent
01adcf3e24
commit
7dc7598d08
@ -40,6 +40,7 @@ public class SecurityComponent {
|
||||
UserBO userBO = (UserBO) user;
|
||||
userInfoBO.setUserId(userBO.getUserId());
|
||||
userInfoBO.setUserUsername(userBO.getUsername());
|
||||
userInfoBO.setUserName(userBO.getUserName());
|
||||
userInfoBO.setUserPhone(userBO.getUserPhone());
|
||||
userInfoBO.setDataAuthority(userBO.getDataAuthority());
|
||||
userInfoBO.setDataAuthorityUserIds(userBO.getDataAuthorityUserIds());
|
||||
|
@ -20,6 +20,10 @@ public interface ISystemConstant {
|
||||
* APP接口前缀
|
||||
*/
|
||||
String API_TAGS_APP_PREFIX = "APP接口-";
|
||||
/**
|
||||
* APP路由接口前缀
|
||||
*/
|
||||
String API_TAGS_APP_ROUTE_PREFIX = "APP路由接口-";
|
||||
/**
|
||||
* 路由接口前缀
|
||||
*/
|
||||
@ -40,6 +44,14 @@ public interface ISystemConstant {
|
||||
* APP前缀
|
||||
*/
|
||||
String APP_PREFIX = "/app";
|
||||
/**
|
||||
* APP路由前缀
|
||||
*/
|
||||
String APP_ROUTE_PREFIX = "/approute";
|
||||
/**
|
||||
* APP放行后缀
|
||||
*/
|
||||
String APP_RELEASE_SUFFIX = "release";
|
||||
/**
|
||||
* true
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ package com.cm.common.pojo.bos;
|
||||
import org.springframework.security.core.GrantedAuthority;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@ -85,7 +86,7 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<String> getBaseDepartmentIds() {
|
||||
return baseDepartmentIds;
|
||||
return baseDepartmentIds == null ? new ArrayList<>(0) : baseDepartmentIds;
|
||||
}
|
||||
|
||||
public void setBaseDepartmentIds(List<String> baseDepartmentIds) {
|
||||
@ -101,7 +102,7 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<String> getDataAuthorityUserIds() {
|
||||
return dataAuthorityUserIds;
|
||||
return dataAuthorityUserIds == null ? new ArrayList<>(0) : dataAuthorityUserIds;
|
||||
}
|
||||
|
||||
public void setDataAuthorityUserIds(List<String> dataAuthorityUserIds) {
|
||||
@ -109,11 +110,14 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<RoleBO> getRoles() {
|
||||
return roles;
|
||||
return roles == null ? new ArrayList<>(0) : roles;
|
||||
}
|
||||
|
||||
public void setRoles(List<RoleBO> roles) {
|
||||
this.roles = roles;
|
||||
if (roles == null || roles.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
roles.forEach(roleBO -> {
|
||||
@ -128,11 +132,14 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<GroupBO> getGroups() {
|
||||
return groups;
|
||||
return groups == null ? new ArrayList<>(0) : groups;
|
||||
}
|
||||
|
||||
public void setGroups(List<GroupBO> groups) {
|
||||
this.groups = groups;
|
||||
if (groups == null || groups.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
groups.forEach(groupBO -> {
|
||||
@ -147,11 +154,14 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<DepartmentBO> getDepartments() {
|
||||
return departments;
|
||||
return departments == null ? new ArrayList<>(0) : departments;
|
||||
}
|
||||
|
||||
public void setDepartments(List<DepartmentBO> departments) {
|
||||
this.departments = departments;
|
||||
if (departments == null || departments.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
departments.forEach(departmentBO -> {
|
||||
@ -166,11 +176,14 @@ public class UserBO extends User {
|
||||
}
|
||||
|
||||
public List<PositionBO> getPositions() {
|
||||
return positions;
|
||||
return positions == null ? new ArrayList<>(0) : positions;
|
||||
}
|
||||
|
||||
public void setPositions(List<PositionBO> positions) {
|
||||
this.positions = positions;
|
||||
if (positions == null || positions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
positions.forEach(positionBO -> {
|
||||
|
@ -69,7 +69,7 @@ public class UserInfoBO {
|
||||
}
|
||||
|
||||
public List<String> getDataAuthorityUserIds() {
|
||||
return dataAuthorityUserIds;
|
||||
return dataAuthorityUserIds == null ? new ArrayList<>(0) : dataAuthorityUserIds;
|
||||
}
|
||||
|
||||
public void setDataAuthorityUserIds(List<String> dataAuthorityUserIds) {
|
||||
@ -77,7 +77,7 @@ public class UserInfoBO {
|
||||
}
|
||||
|
||||
public List<String> getBaseDepartmentIds() {
|
||||
return baseDepartmentIds;
|
||||
return baseDepartmentIds == null ? new ArrayList<>(0) : baseDepartmentIds;
|
||||
}
|
||||
|
||||
public void setBaseDepartmentIds(List<String> baseDepartmentIds) {
|
||||
@ -90,6 +90,9 @@ public class UserInfoBO {
|
||||
|
||||
public void setDepartments(List<DepartmentBO> departments) {
|
||||
this.departments = departments;
|
||||
if (departments == null || departments.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
departments.forEach(departmentBO -> {
|
||||
@ -109,6 +112,9 @@ public class UserInfoBO {
|
||||
|
||||
public void setRoles(List<RoleBO> roles) {
|
||||
this.roles = roles;
|
||||
if (roles == null || roles.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
roles.forEach(roleBO -> {
|
||||
@ -128,6 +134,9 @@ public class UserInfoBO {
|
||||
|
||||
public void setGroups(List<GroupBO> groups) {
|
||||
this.groups = groups;
|
||||
if (groups == null || groups.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
groups.forEach(groupBO -> {
|
||||
@ -147,6 +156,9 @@ public class UserInfoBO {
|
||||
|
||||
public void setPositions(List<PositionBO> positions) {
|
||||
this.positions = positions;
|
||||
if (positions == null || positions.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
StringBuilder idSB = new StringBuilder();
|
||||
StringBuilder nameSB = new StringBuilder();
|
||||
positions.forEach(positionBO -> {
|
||||
|
Loading…
Reference in New Issue
Block a user