mirror of https://gitee.com/stylefeng/roses
【8.3.3】【role】更新新增和修改角色赋值角色分类id
parent
43ea520792
commit
39d436ec14
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue