sql
This commit is contained in:
parent
a0673be746
commit
eef3407dc1
|
|
@ -71,8 +71,12 @@ public class SysRole extends BaseEntity
|
||||||
/**
|
/**
|
||||||
* 所属公司ID
|
* 所属公司ID
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
|
private Long areaId;
|
||||||
|
|
||||||
/** 角色菜单权限 */
|
/** 角色菜单权限 */
|
||||||
private Set<String> permissions;
|
private Set<String> permissions;
|
||||||
|
|
||||||
|
|
@ -232,6 +236,14 @@ public class SysRole extends BaseEntity
|
||||||
this.companyId = companyId;
|
this.companyId = companyId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getAreaId() {
|
||||||
|
return areaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAreaId(Long areaId) {
|
||||||
|
this.areaId = areaId;
|
||||||
|
}
|
||||||
|
|
||||||
public Set<String> getPermissions()
|
public Set<String> getPermissions()
|
||||||
{
|
{
|
||||||
return permissions;
|
return permissions;
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,7 @@ public class SysRoleServiceImpl implements ISysRoleService
|
||||||
role.setRoleKey(str);
|
role.setRoleKey(str);
|
||||||
}
|
}
|
||||||
role.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
role.setCompanyId(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
|
role.setAreaId(SecurityUtils.getLoginUser().getSysUser().getAreaId());
|
||||||
return roleMapper.selectRoleList(role);
|
return roleMapper.selectRoleList(role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyId != null">
|
<if test="companyId != null">
|
||||||
AND r.company_id = #{companyId}
|
AND r.company_id = #{companyId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="areaId != null">
|
||||||
|
AND r.area_id = #{areaId}
|
||||||
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
AND r.status = #{status}
|
AND r.status = #{status}
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue