角色配置按钮权限根据菜单查询按钮修改;
This commit is contained in:
+13
@@ -140,6 +140,19 @@ public class MenuApplicationService {
|
||||
return menuDomainService.queryButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
public List<MenuPo> queryOrgButtonlistById(MenuPo menuPo){
|
||||
//获取登录人信息
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
if (loginUser != null){
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
if (userPo != null){
|
||||
menuPo.setTopOrganizationId(userPo.getTopOrganizationId());
|
||||
menuPo.setOrganizationId(userPo.getOrganizationId());
|
||||
}
|
||||
}
|
||||
return menuDomainService.queryButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询菜单信息
|
||||
*
|
||||
|
||||
@@ -77,6 +77,8 @@ public class MenuPo extends BaseVOEntity implements Serializable {
|
||||
private Long sourceId;
|
||||
@ApiModelProperty(name = "一级组织ID")
|
||||
private Long topOrganizationId;
|
||||
@ApiModelProperty(name = "组织ID")
|
||||
private Long organizationId;
|
||||
|
||||
@ApiModelProperty(name = "一级组织名称")
|
||||
private Long topOrganizationName;
|
||||
@@ -91,5 +93,4 @@ public class MenuPo extends BaseVOEntity implements Serializable {
|
||||
private List<Long> moduleIdList;
|
||||
@ApiModelProperty(name = "首页展示标记(1-是,2-否)")
|
||||
private Integer homeShowFlag;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -82,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
ON me.modules_id = mo.modules_id
|
||||
LEFT JOIN sys_organization so ON me.top_organization_id = so.organization_id
|
||||
AND so.del_flag = 1
|
||||
left join ORGANIZATION_MENU om on me.menu_id = om.menu_id
|
||||
</sql>
|
||||
|
||||
<select id="selectMenuList" parameterType="com.linke.product.domain.menu.repository.po.MenuPo" resultMap="MenuResult">
|
||||
@@ -136,6 +137,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="topOrganizationId != null">
|
||||
and me.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="organizationId != null">
|
||||
and om.organization_id = #{organizationId}
|
||||
</if>
|
||||
<if test="moduleIdList != null and moduleIdList.size > 0">
|
||||
and mo.modules_id in
|
||||
<foreach item="modulesId" collection="moduleIdList" open="(" separator="," close=")">
|
||||
@@ -510,4 +514,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user