【8.3.3】【role】根据公司id查询角色

master^2
stylefeng 2025-02-05 18:33:54 +08:00
parent af6c2b2e4c
commit f1c5c0b8ac
1 changed files with 5 additions and 0 deletions

View File

@ -486,6 +486,11 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
queryWrapper.eq(SysRole::getRoleCategoryId, sysRoleRequest.getRoleCategoryId());
}
// 根据公司id查询角色
if (ObjectUtil.isNotEmpty(sysRoleRequest.getRoleCompanyId())) {
queryWrapper.eq(SysRole::getRoleCompanyId, sysRoleRequest.getRoleCompanyId());
}
// 排序字段
queryWrapper.orderByAsc(SysRole::getRoleType);
queryWrapper.orderByAsc(SysRole::getRoleSort);