动态按钮修改;
This commit is contained in:
+1
-1
@@ -152,7 +152,7 @@ public class MenuApplicationService {
|
||||
}
|
||||
}
|
||||
}
|
||||
return menuDomainService.queryButtonlistById(menuPo);
|
||||
return menuDomainService.queryOrgButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-1
@@ -26,6 +26,8 @@ public interface MenuRepositoryInterface extends IService<Menu> {
|
||||
|
||||
public List<MenuPo> queryButtonlistById(MenuPo menuPo);
|
||||
|
||||
public List<MenuPo> queryOrgButtonlistById(MenuPo menuPo);
|
||||
|
||||
/**
|
||||
* 查询菜单树集合
|
||||
*
|
||||
@@ -150,4 +152,4 @@ public interface MenuRepositoryInterface extends IService<Menu> {
|
||||
* @return
|
||||
*/
|
||||
public List<Menu> selectListByOrganizationId(MenuPo menuPo);
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -29,6 +29,8 @@ public interface MenuMapper extends BaseMapper<Menu> {
|
||||
|
||||
public List<MenuPo> queryButtonlistById(MenuPo menuPo);
|
||||
|
||||
public List<MenuPo> queryOrgButtonlistById(MenuPo menuPo);
|
||||
|
||||
/**
|
||||
* 查询菜单树集合
|
||||
*
|
||||
@@ -154,4 +156,4 @@ public interface MenuMapper extends BaseMapper<Menu> {
|
||||
|
||||
@Select("SELECT * FROM custom_auth WHERE menu_id in (SELECT menu_id FROM sys_menu WHERE top_organization_id = #{organizationId})")
|
||||
List<CustomAuth> getCustomAuthByOrganizationId(@Param("organizationId") Long organizationId);
|
||||
}
|
||||
}
|
||||
+5
@@ -52,6 +52,11 @@ public class MenuRepositoryImpl extends ServiceImpl<MenuMapper,Menu> implements
|
||||
return menuMapper.queryButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MenuPo> queryOrgButtonlistById(MenuPo menuPo){
|
||||
return menuMapper.queryOrgButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单树集合
|
||||
*
|
||||
|
||||
+5
-1
@@ -53,6 +53,10 @@ public class MenuDomainService {
|
||||
return menuRepositoryImpl.queryButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
public List<MenuPo> queryOrgButtonlistById(MenuPo menuPo){
|
||||
return menuRepositoryImpl.queryOrgButtonlistById(menuPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询菜单前端组件集合
|
||||
*
|
||||
@@ -821,4 +825,4 @@ public class MenuDomainService {
|
||||
public List<Menu> getMenuByTenantsId(Long tenantsId, Integer menuShow) {
|
||||
return menuRepositoryImpl.getMenuByTenantsId(tenantsId, menuShow);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,7 +82,54 @@ 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>
|
||||
|
||||
<sql id="selectOrgMenuVo">
|
||||
SELECT
|
||||
me.menu_id,
|
||||
me.parent_menu_id,
|
||||
me.modules_id,
|
||||
mo.modules_name,
|
||||
me.product_id,
|
||||
me.menu_client,
|
||||
me.menu_type,
|
||||
me.menu_name,
|
||||
me.menu_show_name,
|
||||
me.menu_path,
|
||||
me.micro_service_path,
|
||||
me.menu_component,
|
||||
me.menu_redirect_path,
|
||||
me.menu_icon,
|
||||
me.menu_sort,
|
||||
me.menu_avatar,
|
||||
me.app_location_code,
|
||||
me.app_location_name,
|
||||
me.menu_hidden,
|
||||
me.menu_visible,
|
||||
me.menu_cache_status,
|
||||
me.menu_always_show,
|
||||
me.menu_internal_or_external,
|
||||
me.menu_remark,
|
||||
me.menu_linkage,
|
||||
me.menu_show,
|
||||
me.menu_perms,
|
||||
me.create_time,
|
||||
me.create_by,
|
||||
me.update_time,
|
||||
me.update_by,
|
||||
me.source_id,
|
||||
me.del_flag,
|
||||
so.organization_name,
|
||||
me.top_organization_id,
|
||||
me.home_show_flag
|
||||
FROM
|
||||
sys_menu me
|
||||
LEFT JOIN
|
||||
sys_modules mo
|
||||
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">
|
||||
@@ -126,6 +173,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
<select id="queryButtonlistById" parameterType="com.linke.product.domain.menu.repository.po.MenuPo" resultMap="MenuResult">
|
||||
<include refid="selectMenuVo"/>
|
||||
<where>
|
||||
me.del_flag = 1 and me.menu_type=3
|
||||
<if test="modulesId != null and modulesId != '-1'.toString()">
|
||||
and mo.modules_id = #{modulesId}
|
||||
</if>
|
||||
<if test="menuId != null">
|
||||
and me.parent_menu_id = #{menuId}
|
||||
</if>
|
||||
<if test="topOrganizationId != null">
|
||||
and me.top_organization_id = #{topOrganizationId}
|
||||
</if>
|
||||
<if test="moduleIdList != null and moduleIdList.size > 0">
|
||||
and mo.modules_id in
|
||||
<foreach item="modulesId" collection="moduleIdList" open="(" separator="," close=")">
|
||||
#{modulesId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="menuIdList != null and menuIdList.size > 0">
|
||||
and me.menu_id in
|
||||
<foreach item="menuId" collection="menuIdList" open="(" separator="," close=")">
|
||||
#{menuId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="queryOrgButtonlistById" parameterType="com.linke.product.domain.menu.repository.po.MenuPo" resultMap="MenuResult">
|
||||
<include refid="selectOrgMenuVo"/>
|
||||
<where>
|
||||
me.del_flag = 1 and me.menu_type=3
|
||||
<if test="modulesId != null and modulesId != '-1'.toString()">
|
||||
|
||||
Reference in New Issue
Block a user