<!-- 动态显示菜单栏 -->
<select id="titleList" parameterType="int" resultType="channel">
SELECT
c.channel_id,c.parent_id,c.channel_name,c.channel_path,c.is_display,
mm.bb as channel_type,c.is_sync_union,c.union_type_id,c.union_community_id
FROM con_channel c
LEFT JOIN (
SELECT
DISTINCT rm.menucode AS aa,ur.USER_ID AS bb
FROM xt_role_menu rm, xt_role r, xt_user_role ur
WHERE rm.role_id=r.role_id AND r.role_type='1' AND r.role_id=ur.role_id AND ur.user_id=#{userId}
) mm
ON mm.aa=c.channel_path
WHERE c.valid='1' and c.is_display=1 AND c.parent_id=-1
order by c.sort_num asc
</select>
<select id="titleList" parameterType="int" resultType="channel">
SELECT
c.channel_id,c.parent_id,c.channel_name,c.channel_path,c.is_display,
mm.bb as channel_type,c.is_sync_union,c.union_type_id,c.union_community_id
FROM con_channel c
LEFT JOIN (
SELECT
DISTINCT rm.menucode AS aa,ur.USER_ID AS bb
FROM xt_role_menu rm, xt_role r, xt_user_role ur
WHERE rm.role_id=r.role_id AND r.role_type='1' AND r.role_id=ur.role_id AND ur.user_id=#{userId}
) mm
ON mm.aa=c.channel_path
WHERE c.valid='1' and c.is_display=1 AND c.parent_id=-1
order by c.sort_num asc
</select>