|
|
|
@ -8,7 +8,7 @@
|
|
|
|
|
<id property="menuId" column="menu_id" />
|
|
|
|
|
<result property="menuName" column="menu_name" />
|
|
|
|
|
<result property="parentId" column="parent_id" />
|
|
|
|
|
<result property="orderNum" column="order_num" />
|
|
|
|
|
<result property="sort" column="sort" />
|
|
|
|
|
<result property="path" column="path" />
|
|
|
|
|
<result property="component" column="component" />
|
|
|
|
|
<result property="isFrame" column="is_frame" />
|
|
|
|
@ -22,7 +22,7 @@
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectMenuVo">
|
|
|
|
|
select menu_id, menu_name, parent_id, order_num, path, component, is_frame, menu_type, menu_status, visible, ifnull(perms,'') as perms, icon, create_time
|
|
|
|
|
select menu_id, menu_name, parent_id, sort, path, component, is_frame, menu_type, menu_status, visible, ifnull(perms,'') as perms, icon, create_time
|
|
|
|
|
from sys_menu m
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
@ -34,24 +34,24 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="menuStatus != null">and m.menu_status = #{menuStatus}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by m.parent_id, m.order_num
|
|
|
|
|
order by m.parent_id, m.sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMenuTreeAll" resultMap="SysMenuResult">
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.visible, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.visible, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
|
|
|
|
|
from sys_menu m where m.menu_type in ('M', 'C') and m.menu_status = 0
|
|
|
|
|
order by m.parent_id, m.order_num
|
|
|
|
|
order by m.parent_id, m.sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.menu_status, m.visible, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
|
|
|
|
|
from sys_menu m
|
|
|
|
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
|
|
|
|
left join sys_user_role ur on rm.role_id = ur.role_id
|
|
|
|
|
left join sys_role ro on ur.role_id = ro.role_id
|
|
|
|
|
left join sys_user u on ur.user_id = u.user_id
|
|
|
|
|
where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.menu_status = 0 AND ro.role_status = 0
|
|
|
|
|
order by m.parent_id, m.order_num
|
|
|
|
|
order by m.parent_id, m.sort
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
|
|
|
|
@ -64,7 +64,7 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectMenuListByUserId" resultMap="SysMenuResult">
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.menu_status, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.order_num, m.create_time
|
|
|
|
|
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.visible, m.menu_status, ifnull(m.perms,'') as perms, m.is_frame, m.menu_type, m.icon, m.sort, m.create_time
|
|
|
|
|
from sys_menu m
|
|
|
|
|
left join sys_role_menu rm on m.menu_id = rm.menu_id
|
|
|
|
|
left join sys_user_role ur on rm.role_id = ur.role_id
|
|
|
|
@ -76,6 +76,6 @@
|
|
|
|
|
</if>
|
|
|
|
|
<if test="menu.menuStatus != null">and menu_status = #{menu.menuStatus}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by m.parent_id, m.order_num
|
|
|
|
|
order by m.parent_id, m.sort
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|