This commit is contained in:
sxu 2025-02-17 17:24:46 +08:00
parent a0673be746
commit eef3407dc1
3 changed files with 16 additions and 0 deletions

View File

@ -71,8 +71,12 @@ public class SysRole extends BaseEntity
/**
* 所属公司ID
*/
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long companyId;
@JsonFormat(shape = JsonFormat.Shape.STRING)
private Long areaId;
/** 角色菜单权限 */
private Set<String> permissions;
@ -232,6 +236,14 @@ public class SysRole extends BaseEntity
this.companyId = companyId;
}
public Long getAreaId() {
return areaId;
}
public void setAreaId(Long areaId) {
this.areaId = areaId;
}
public Set<String> getPermissions()
{
return permissions;

View File

@ -78,6 +78,7 @@ public class SysRoleServiceImpl implements ISysRoleService
role.setRoleKey(str);
}
role.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
role.setAreaId(SecurityUtils.getLoginUser().getSysUser().getAreaId());
return roleMapper.selectRoleList(role);
}

View File

@ -44,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="companyId != null">
AND r.company_id = #{companyId}
</if>
<if test="areaId != null">
AND r.area_id = #{areaId}
</if>
<if test="status != null and status != ''">
AND r.status = #{status}
</if>