serv\web- 多租户修改
This commit is contained in:
@@ -26,6 +26,13 @@ public class TbSysDept extends BaseDTO{
|
||||
*/
|
||||
private String parentID;
|
||||
|
||||
/**
|
||||
* @description 部门路径,格式:/root_department/dept_001/
|
||||
* @author yslg
|
||||
* @since 2025-10-29
|
||||
*/
|
||||
private String deptPath;
|
||||
|
||||
/**
|
||||
* @description 部门名称
|
||||
* @author yslg
|
||||
@@ -71,6 +78,14 @@ public class TbSysDept extends BaseDTO{
|
||||
this.parentID = parentID;
|
||||
}
|
||||
|
||||
public String getDeptPath() {
|
||||
return deptPath;
|
||||
}
|
||||
|
||||
public void setDeptPath(String deptPath) {
|
||||
this.deptPath = deptPath;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -109,6 +124,7 @@ public class TbSysDept extends BaseDTO{
|
||||
"id='" + getID() + '\'' +
|
||||
", deptID='" + deptID + '\'' +
|
||||
", parentID='" + parentID + '\'' +
|
||||
", deptPath='" + deptPath + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", creator='" + creator + '\'' +
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
package org.xyzh.common.vo;
|
||||
|
||||
import org.xyzh.common.dto.dept.TbSysDept;
|
||||
import org.xyzh.common.dto.role.TbSysRole;
|
||||
import org.xyzh.common.dto.user.TbSysUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DeptRoleVO {
|
||||
|
||||
private TbSysDept dept;
|
||||
private TbSysRole role;
|
||||
|
||||
private List<TbSysDept> depts;
|
||||
private List<TbSysRole> roles;
|
||||
private List<TbSysUser> users;
|
||||
|
||||
public TbSysDept getDept() {
|
||||
return dept;
|
||||
}
|
||||
|
||||
public void setDept(TbSysDept dept) {
|
||||
this.dept = dept;
|
||||
}
|
||||
|
||||
public TbSysRole getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(TbSysRole role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public List<TbSysDept> getDepts() {
|
||||
return depts;
|
||||
}
|
||||
|
||||
public void setDepts(List<TbSysDept> depts) {
|
||||
this.depts = depts;
|
||||
}
|
||||
|
||||
public List<TbSysRole> getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(List<TbSysRole> roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public List<TbSysUser> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(List<TbSysUser> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package org.xyzh.common.vo;
|
||||
|
||||
import org.xyzh.common.dto.permission.TbResourcePermission;
|
||||
|
||||
/**
|
||||
* @description 资源权限视图对象
|
||||
* @filename ResourcePermissionVO.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-10-29
|
||||
*/
|
||||
public class ResourcePermissionVO extends TbResourcePermission {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 部门名称
|
||||
*/
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* @description 角色名称
|
||||
*/
|
||||
private String roleName;
|
||||
|
||||
/**
|
||||
* @description 资源标题(根据资源类型获取)
|
||||
*/
|
||||
private String resourceTitle;
|
||||
|
||||
/**
|
||||
* @description 查询用的用户ID(用于权限校验)
|
||||
*/
|
||||
private String userID;
|
||||
|
||||
/**
|
||||
* @description 用户的部门ID列表(用于权限校验)
|
||||
*/
|
||||
private String[] userDeptIDs;
|
||||
|
||||
/**
|
||||
* @description 用户的角色ID列表(用于权限校验)
|
||||
*/
|
||||
private String[] userRoleIDs;
|
||||
|
||||
public ResourcePermissionVO() {
|
||||
super();
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getResourceTitle() {
|
||||
return resourceTitle;
|
||||
}
|
||||
|
||||
public void setResourceTitle(String resourceTitle) {
|
||||
this.resourceTitle = resourceTitle;
|
||||
}
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public void setUserID(String userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String[] getUserDeptIDs() {
|
||||
return userDeptIDs;
|
||||
}
|
||||
|
||||
public void setUserDeptIDs(String[] userDeptIDs) {
|
||||
this.userDeptIDs = userDeptIDs;
|
||||
}
|
||||
|
||||
public String[] getUserRoleIDs() {
|
||||
return userRoleIDs;
|
||||
}
|
||||
|
||||
public void setUserRoleIDs(String[] userRoleIDs) {
|
||||
this.userRoleIDs = userRoleIDs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResourcePermissionVO{" +
|
||||
"id=" + getID() +
|
||||
", resourceType=" + getResourceType() +
|
||||
", resourceID='" + getResourceID() + '\'' +
|
||||
", resourceTitle='" + resourceTitle + '\'' +
|
||||
", deptID='" + getDeptID() + '\'' +
|
||||
", deptName='" + deptName + '\'' +
|
||||
", roleID='" + getRoleID() + '\'' +
|
||||
", roleName='" + roleName + '\'' +
|
||||
", canRead=" + getCanRead() +
|
||||
", canWrite=" + getCanWrite() +
|
||||
", canExecute=" + getCanExecute() +
|
||||
", creator='" + getCreator() + '\'' +
|
||||
", updater='" + getUpdater() + '\'' +
|
||||
", createTime=" + getCreateTime() +
|
||||
", updateTime=" + getUpdateTime() +
|
||||
", deleted=" + getDeleted() +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +1,159 @@
|
||||
package org.xyzh.common.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
import org.xyzh.common.dto.dept.TbSysDept;
|
||||
import org.xyzh.common.dto.role.TbSysRole;
|
||||
import org.xyzh.common.dto.user.TbSysUser;
|
||||
import org.xyzh.common.dto.user.TbSysUserDeptRole;
|
||||
|
||||
public class UserDeptRoleVO extends BaseDTO{
|
||||
private TbSysUser user;
|
||||
private List<TbSysUser> users;
|
||||
import java.util.List;
|
||||
|
||||
public class UserDeptRoleVO {
|
||||
private List<TbSysDept> depts;
|
||||
private List<TbSysRole> roles;
|
||||
private List<TbSysUser> users;
|
||||
private List<TbSysUserDeptRole> userDeptRoles;
|
||||
|
||||
public TbSysUser getUser() {
|
||||
return user;
|
||||
}
|
||||
public void setUser(TbSysUser user) {
|
||||
this.user = user;
|
||||
}
|
||||
public List<TbSysUser> getUsers() {
|
||||
return users;
|
||||
}
|
||||
public void setUsers(List<TbSysUser> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
|
||||
// 扁平化字段,用于权限查询优化
|
||||
private String userID;
|
||||
private String username;
|
||||
private String deptID;
|
||||
private String deptName;
|
||||
private String deptDescription;
|
||||
private String parentID;
|
||||
private String parentName;
|
||||
private String parentDescription;
|
||||
private String roleID;
|
||||
private String roleName;
|
||||
private String roleDescription;
|
||||
private String deptPath; // 部门路径,用于快速权限继承判断
|
||||
|
||||
public List<TbSysDept> getDepts() {
|
||||
return depts;
|
||||
}
|
||||
|
||||
public void setDepts(List<TbSysDept> depts) {
|
||||
this.depts = depts;
|
||||
}
|
||||
|
||||
public List<TbSysRole> getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(List<TbSysRole> roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
public List<TbSysUserDeptRole> getUserDeptRoles() {
|
||||
return userDeptRoles;
|
||||
}
|
||||
public void setUserDeptRoles(List<TbSysUserDeptRole> userDeptRoles) {
|
||||
this.userDeptRoles = userDeptRoles;
|
||||
|
||||
public List<TbSysUser> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
|
||||
public void setUsers(List<TbSysUser> users) {
|
||||
this.users = users;
|
||||
}
|
||||
|
||||
public String getUserID() {
|
||||
return userID;
|
||||
}
|
||||
|
||||
public void setUserID(String userID) {
|
||||
this.userID = userID;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getDeptID() {
|
||||
return deptID;
|
||||
}
|
||||
|
||||
public void setDeptID(String deptID) {
|
||||
this.deptID = deptID;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getDeptDescription() {
|
||||
return deptDescription;
|
||||
}
|
||||
|
||||
public void setDeptDescription(String deptDescription) {
|
||||
this.deptDescription = deptDescription;
|
||||
}
|
||||
|
||||
public String getParentID() {
|
||||
return parentID;
|
||||
}
|
||||
|
||||
public void setParentID(String parentID) {
|
||||
this.parentID = parentID;
|
||||
}
|
||||
|
||||
public String getParentName() {
|
||||
return parentName;
|
||||
}
|
||||
|
||||
public void setParentName(String parentName) {
|
||||
this.parentName = parentName;
|
||||
}
|
||||
|
||||
public String getParentDescription() {
|
||||
return parentDescription;
|
||||
}
|
||||
|
||||
public void setParentDescription(String parentDescription) {
|
||||
this.parentDescription = parentDescription;
|
||||
}
|
||||
|
||||
public String getRoleID() {
|
||||
return roleID;
|
||||
}
|
||||
|
||||
public void setRoleID(String roleID) {
|
||||
this.roleID = roleID;
|
||||
}
|
||||
|
||||
public String getRoleName() {
|
||||
return roleName;
|
||||
}
|
||||
|
||||
public void setRoleName(String roleName) {
|
||||
this.roleName = roleName;
|
||||
}
|
||||
|
||||
public String getRoleDescription() {
|
||||
return roleDescription;
|
||||
}
|
||||
|
||||
public void setRoleDescription(String roleDescription) {
|
||||
this.roleDescription = roleDescription;
|
||||
}
|
||||
|
||||
public String getDeptPath() {
|
||||
return deptPath;
|
||||
}
|
||||
|
||||
public void setDeptPath(String deptPath) {
|
||||
this.deptPath = deptPath;
|
||||
}
|
||||
|
||||
public List<TbSysUserDeptRole> getUserDeptRoles() {
|
||||
return userDeptRoles;
|
||||
}
|
||||
|
||||
public void setUserDeptRoles(List<TbSysUserDeptRole> userDeptRoles) {
|
||||
this.userDeptRoles = userDeptRoles;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user