| | |
| | | <if test="type != null"> |
| | | AND type = #{type} |
| | | </if> |
| | | <if test="hostId != null"> |
| | | AND host_id = #{hostId} |
| | | </if> |
| | | and deleted = 0 |
| | | and id in ( |
| | | <if test="userId != null"> |
| | | and id in ( |
| | | select menu_id from sys_role_menu |
| | | where role_id in ( |
| | | select sur.role_id from sys_user_role sur |
| | | left join sys_role sr on sur.role_id = sr.id |
| | | where 1=1 |
| | | and sur.user_id = #{userId} |
| | | and sr.deleted = 0 |
| | | select sur.role_id from sys_user_role sur |
| | | left join sys_role sr on sur.role_id = sr.id |
| | | where 1=1 |
| | | and sur.user_id = #{userId} |
| | | and sr.deleted = 0 |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | order by sort |
| | | </select> |
| | | |