select menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time from system_menu
AND menu_name LIKE '%' || #{menuName} || '%'
AND menu_name like concat('%', #{menuName}, '%')
AND visible = #{visible}
AND status = #{status}
order by parent_id, order_num
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from system_menu m where m.menu_type in ('M', 'C') and m.status = 0 order by m.parent_id, m.order_num
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id left join system_user_role ur on rm.role_id = ur.role_id left join system_role ro on ur.role_id = ro.role_id where ur.user_id = #{params.userId} AND m.menu_name like concat('%', #{menuName}, '%') AND m.visible = #{visible} AND m.status = #{status} order by m.parent_id, m.order_num
select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id left join system_user_role ur on rm.role_id = ur.role_id left join system_role ro on ur.role_id = ro.role_id left join system_user u on ur.user_id = u.user_id where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0 order by m.parent_id, m.order_num
select m.menu_id from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id where rm.role_id = #{roleId} and m.menu_id not in (select m.parent_id from system_menu m inner join system_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) order by m.parent_id, m.order_num
select distinct m.perms from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id left join system_user_role ur on rm.role_id = ur.role_id
select distinct m.perms from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id left join system_user_role ur on rm.role_id = ur.role_id left join system_role r on r.role_id = ur.role_id where m.status = '0' and r.status = '0' and ur.user_id = #{userId}
select distinct m.perms from system_menu m left join system_role_menu rm on m.menu_id = rm.menu_id where m.status = '0' and rm.role_id = #{roleId}
where menu_id = #{menuId}
select count(1) from system_menu where parent_id = #{menuId}
where menu_name=#{menuName} and parent_id = #{parentId} limit 1
update system_menu menu_name = #{menuName}, parent_id = #{parentId}, order_num = #{orderNum}, path = #{path}, component = #{component}, query = #{query}, route_name = #{routeName}, is_frame = #{isFrame}, is_cache = #{isCache}, menu_type = #{menuType}, visible = #{visible}, status = #{status}, perms = #{perms}, icon = #{icon}, remark = #{remark}, update_by = #{updateBy}, update_time = sysdate() where menu_id = #{menuId}
insert into system_menu( menu_id, parent_id, menu_name, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, perms, icon, remark, create_by, create_time )values( #{menuId}, #{parentId}, #{menuName}, #{orderNum}, #{path}, #{component}, #{query}, #{routeName}, #{isFrame}, #{isCache}, #{menuType}, #{visible}, #{status}, #{perms}, #{icon}, #{remark}, #{createBy}, sysdate() )
delete from system_menu where menu_id = #{menuId}