【8.3.3】【role】更新新增和修改角色赋值角色分类id

dev-8.3.3
stylefeng 2025-01-23 18:24:38 +08:00
parent 43ea520792
commit 39d436ec14
2 changed files with 3 additions and 2 deletions

View File

@ -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;
/**
* id20
*/
@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;

View File

@ -170,6 +170,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
// 如果是编辑角色改为了基础类型则需要将公司id清空
if (RoleTypeEnum.SYSTEM_ROLE.getCode().equals(sysRoleRequest.getRoleType())) {
sysRole.setRoleCompanyId(null);
sysRole.setRoleCategoryId(null);
}
this.updateById(sysRole);