| | |
| | | <resultMap type="SysMenu" id="SysMenuResult"> |
| | | <id property="menuId" column="menu_id" /> |
| | | <result property="menuName" column="menu_name" /> |
| | | <result property="menuNameEnglish" column="menu_name_english" /> |
| | | <result property="menuNameI18n" column="menu_name_i18n" /> |
| | | <result property="parentName" column="parent_name" /> |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="orderNum" column="order_num" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectMenuVo"> |
| | | select menu_id, menu_name,menu_name_english, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, coalesce(perms,'') as perms, icon, create_time |
| | | select menu_id, menu_name,menu_name_i18n, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, coalesce(perms,'') as perms, icon, create_time |
| | | from sys_menu |
| | | </sql> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeAll" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_english, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_i18n, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m where m.menu_type in ('M', 'C') and m.status = '0' |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | | <select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_english, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_i18n, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, 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 |
| | |
| | | </select> |
| | | |
| | | <select id="selectMenuTreeByUserId" parameterType="String" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_english, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | select distinct m.menu_id, m.parent_id, m.menu_name,m.menu_name_i18n, m.path, m.component, m.query, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, 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 |
| | |
| | | update sys_menu |
| | | <set> |
| | | <if test="menuName != null and menuName != ''">menu_name = #{menuName},</if> |
| | | <if test="menuNameEnglish != null and menuNameEnglish != ''">menu_name_english = #{menuNameEnglish},</if> |
| | | <if test="menuNameI18n != null and menuNameI18n != ''">menu_name_i18n = #{menuNameI18n},</if> |
| | | <if test="parentId != null">parent_id = #{parentId},</if> |
| | | <if test="orderNum != null">order_num = #{orderNum},</if> |
| | | <if test="path != null and path != ''">path = #{path},</if> |
| | |
| | | <if test="menuId != null and menuId != 0">menu_id,</if> |
| | | <if test="parentId != null and parentId != 0">parent_id,</if> |
| | | <if test="menuName != null and menuName != ''">menu_name,</if> |
| | | <if test="menuNameEnglish != null and menuNameEnglish != ''">menu_name_english,</if> |
| | | <if test="menuNameI18n != null and menuNameI18n != ''">menu_name_i18n,</if> |
| | | <if test="orderNum != null">order_num,</if> |
| | | <if test="path != null and path != ''">path,</if> |
| | | <if test="component != null and component != ''">component,</if> |
| | |
| | | <if test="menuId != null and menuId != 0">#{menuId},</if> |
| | | <if test="parentId != null and parentId != 0">#{parentId},</if> |
| | | <if test="menuName != null and menuName != ''">#{menuName},</if> |
| | | <if test="menuNameEnglish != null and menuNameEnglish != ''">#{menuNameEnglish},</if> |
| | | <if test="menuNameI18n != null and menuNameI18n != ''">#{menuNameI18n},</if> |
| | | <if test="orderNum != null">#{orderNum},</if> |
| | | <if test="path != null and path != ''">#{path},</if> |
| | | <if test="component != null and component != ''">#{component},</if> |