This commit is contained in:
2026-05-06 15:09:13 +08:00
parent b42bee48ea
commit 364d9d80dc
12 changed files with 115 additions and 65 deletions

View File

@@ -35,6 +35,8 @@ public interface SysRoleMapper
*/
public List<SysRole> selectRoleAll();
public List<SysRole> selectAllocatableRole(Integer roleLevel);
/**
* 根据用户ID获取角色选择框列表
*

View File

@@ -46,6 +46,13 @@ public interface ISysRoleService
*/
public List<SysRole> selectRoleAll();
/**
* 查询所有角色
*
* @return 角色列表
*/
public List<SysRole> selectAllocatableRole(Long roleId);
/**
* 根据用户ID获取角色选择框列表
*

View File

@@ -29,6 +29,9 @@ public class SysSiteService {
if (site != null && !StringUtils.isEmpty(site.getSiteName())) {
queryWrapper.like(SysSite::getSiteName, site.getSiteName());
}
if (site != null && site.getOrgId()!=null) {
queryWrapper.eq(SysSite::getOrgId, site.getOrgId());
}
return sysSiteMapper.selectList(queryWrapper);
}

View File

@@ -116,6 +116,17 @@ public class SysRoleServiceImpl implements ISysRoleService {
return permsSet;
}
/**
* 查询所有角色
*
* @return 角色列表
*/
@Override
public List<SysRole> selectAllocatableRole(Long roleId) {
SysRole sysRole = roleMapper.selectRoleById(roleId);
return roleMapper.selectAllocatableRole(sysRole.getRoleLevel());
}
/**
* 查询所有角色
*