mirror of https://gitee.com/stylefeng/roses
【8.3.3】【role】角色列表查询,增加角色分类的查询条件
parent
eac8d42b90
commit
43ea520792
|
@ -88,4 +88,10 @@ public class SysRoleRequest extends BaseRequest {
|
||||||
@ChineseDescription("角色id集合,用在批量删除")
|
@ChineseDescription("角色id集合,用在批量删除")
|
||||||
private Set<Long> roleIdList;
|
private Set<Long> roleIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色分类id
|
||||||
|
*/
|
||||||
|
@ChineseDescription("角色分类id")
|
||||||
|
private Long roleCategoryId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -454,6 +454,11 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
||||||
queryWrapper.nested(i -> i.like(SysRole::getRoleName, searchText).or().like(SysRole::getRoleCode, searchText));
|
queryWrapper.nested(i -> i.like(SysRole::getRoleName, searchText).or().like(SysRole::getRoleCode, searchText));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据角色分类id查询角色
|
||||||
|
if (ObjectUtil.isNotEmpty(sysRoleRequest.getRoleCategoryId())) {
|
||||||
|
queryWrapper.eq(SysRole::getRoleCategoryId, sysRoleRequest.getRoleCategoryId());
|
||||||
|
}
|
||||||
|
|
||||||
// 排序字段
|
// 排序字段
|
||||||
queryWrapper.orderByAsc(SysRole::getRoleType);
|
queryWrapper.orderByAsc(SysRole::getRoleType);
|
||||||
queryWrapper.orderByAsc(SysRole::getRoleSort);
|
queryWrapper.orderByAsc(SysRole::getRoleSort);
|
||||||
|
|
Loading…
Reference in New Issue