From 43ea520792f7b88b8e29ca7a8b86cc5b32ba3e5e Mon Sep 17 00:00:00 2001 From: stylefeng Date: Thu, 23 Jan 2025 18:05:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.3.3=E3=80=91=E3=80=90role=E3=80=91?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=A7=92=E8=89=B2=E5=88=86=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/modular/role/pojo/request/SysRoleRequest.java | 6 ++++++ .../sys/modular/role/service/impl/SysRoleServiceImpl.java | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/pojo/request/SysRoleRequest.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/pojo/request/SysRoleRequest.java index ccfcf2d09..4a2c6599d 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/pojo/request/SysRoleRequest.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/pojo/request/SysRoleRequest.java @@ -88,4 +88,10 @@ public class SysRoleRequest extends BaseRequest { @ChineseDescription("角色id集合,用在批量删除") private Set roleIdList; + /** + * 角色分类id + */ + @ChineseDescription("角色分类id") + private Long roleCategoryId; + } diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java index 4a34c39c7..906e19580 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleServiceImpl.java @@ -454,6 +454,11 @@ public class SysRoleServiceImpl extends ServiceImpl impl 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::getRoleSort);