From 39d436ec14883a4ac2c4d75df91a330041e6ad9a Mon Sep 17 00:00:00 2001 From: stylefeng Date: Thu, 23 Jan 2025 18:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.3.3=E3=80=91=E3=80=90role=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=B0=E5=A2=9E=E5=92=8C=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E8=B5=8B=E5=80=BC=E8=A7=92=E8=89=B2=E5=88=86?= =?UTF-8?q?=E7=B1=BBid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roses/kernel/sys/modular/role/entity/SysRole.java | 4 ++-- .../sys/modular/role/service/impl/SysRoleServiceImpl.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/entity/SysRole.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/entity/SysRole.java index 92963b764..9a4c1c1b2 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/entity/SysRole.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/entity/SysRole.java @@ -80,14 +80,14 @@ public class SysRole extends BaseExpandFieldEntity { /** * 所属的角色分类id,如果是业务角色和公司角色可以加上所属分类 */ - @TableField("role_category_id") + @TableField(value = "role_category_id", updateStrategy = FieldStrategy.ALWAYS, insertStrategy = FieldStrategy.ALWAYS) @ChineseDescription("所属的角色分类id,如果是业务角色和公司角色可以加上所属分类") private Long roleCategoryId; /** * 角色所属公司id,当角色类型为20时传此值 */ - @TableField(value = "role_company_id", updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED) + @TableField(value = "role_company_id", updateStrategy = FieldStrategy.ALWAYS, insertStrategy = FieldStrategy.ALWAYS) @ChineseDescription("角色所属公司id,当角色类型为20时传此值") @SimpleFieldFormat(processClass = OrgNameFormatProcess.class) private Long roleCompanyId; 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 906e19580..70c0aa9a6 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 @@ -170,6 +170,7 @@ public class SysRoleServiceImpl extends ServiceImpl impl // 如果是编辑角色,改为了基础类型,则需要将公司id清空 if (RoleTypeEnum.SYSTEM_ROLE.getCode().equals(sysRoleRequest.getRoleType())) { sysRole.setRoleCompanyId(null); + sysRole.setRoleCategoryId(null); } this.updateById(sysRole);