| | |
| | | a.account_name = #{accountName} and r.id is not null |
| | | </select> |
| | | |
| | | <select id="getScreenRoleByAccountName" resultType="int"> |
| | | SELECT channel_id |
| | | from |
| | | (select DISTINCT channel_id FROM role_menu |
| | | WHERE role_id in ( select r.id from |
| | | role r |
| | | right join account_role ar on ar.role_id = r.id |
| | | right join account a on a.id = ar.account_id |
| | | where |
| | | a.account_name = #{accountName} and r.id is not null)) s |
| | | where s.channel_id=1; |
| | | </select> |
| | | |
| | | <select id="getParentMenuListsByAccountName" resultMap="MenuResultMap" parameterType="java.lang.String"> |
| | | select |
| | | DISTINCT |
| | |
| | | where |
| | | a.account_name = #{accountName} and r.is_delete=0 and r.id is not null |
| | | ) |
| | | where m.menu_parent_id=0 |
| | | where m.menu_parent_id=0 and m.is_delete=0 |
| | | order by m.menu_order |
| | | </select> |
| | | |
| | |
| | | where |
| | | a.account_name = #{accountName} and r.is_delete=0 and r.id is not null |
| | | ) |
| | | where m.menu_parent_id = #{id} |
| | | where m.menu_parent_id = #{id} and m.is_delete=0 |
| | | order by m.menu_order |
| | | </select> |
| | | |
| | |
| | | where account_name = #{accountName} |
| | | </select> |
| | | |
| | | <select id="getScreenMenuListsByAccountName" resultMap="MenuResultMap" parameterType="java.lang.String"> |
| | | select |
| | | DISTINCT |
| | | m.id,m.menu_name,m.menu_icon,m.menu_url,m.menu_order,m.menu_parent_id |
| | | from |
| | | menu m |
| | | right join role_menu rm on rm.channel_id = m.channel_id and rm.menu_id=m.id and m.channel_id=1 |
| | | right join role on rm.role_id in |
| | | ( |
| | | select |
| | | r.id |
| | | from |
| | | role r |
| | | right join |
| | | account_role ar on ar.role_id = r.id |
| | | right join |
| | | account a on a.id = ar.account_id |
| | | where |
| | | a.account_name = #{accountName} and r.is_delete=0 and r.id is not null |
| | | ) |
| | | where m.menu_parent_id=0 and m.is_delete=0 |
| | | order by m.menu_order |
| | | </select> |
| | | |
| | | </mapper> |