|
|
|
@ -328,10 +328,13 @@
|
|
|
|
|
category = 1 |
|
|
|
|
AND is_deleted = 0 |
|
|
|
|
AND id IN ( SELECT menu_id FROM blade_scope_data WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
|
|
|
|
AND id IN ( select menu_id from blade_role_menu where role_id in |
|
|
|
|
AND ( |
|
|
|
|
id IN ( |
|
|
|
|
select menu_id from blade_role_menu where role_id in |
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
OR id IN ( |
|
|
|
|
select parent_id from blade_menu where is_deleted = 0 |
|
|
|
|
and id in ( select menu_id from blade_role_menu where role_id in |
|
|
|
@ -339,8 +342,7 @@
|
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
) |
|
|
|
|
ORDER BY |
|
|
|
|
sort |
|
|
|
|
) |
|
|
|
|
) menu |
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
@ -355,10 +357,13 @@
|
|
|
|
|
blade_scope_data |
|
|
|
|
WHERE |
|
|
|
|
is_deleted = 0 |
|
|
|
|
AND menu_id IN ( select menu_id from blade_role_menu where role_id in |
|
|
|
|
AND ( |
|
|
|
|
menu_id IN ( |
|
|
|
|
select menu_id from blade_role_menu where role_id in |
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
OR menu_id IN ( |
|
|
|
|
select parent_id from blade_menu where is_deleted = 0 |
|
|
|
|
and id in ( select menu_id from blade_role_menu where role_id in |
|
|
|
@ -366,6 +371,7 @@
|
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
AND menu_id IS NOT NULL |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
@ -386,19 +392,22 @@
|
|
|
|
|
category = 1 |
|
|
|
|
AND is_deleted = 0 |
|
|
|
|
AND id IN ( SELECT menu_id FROM blade_scope_api WHERE is_deleted = 0 AND menu_id IS NOT NULL ) |
|
|
|
|
AND id IN ( select menu_id from blade_role_menu where role_id in |
|
|
|
|
AND ( |
|
|
|
|
id IN ( |
|
|
|
|
select menu_id from blade_role_menu where role_id in |
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
OR id IN ( |
|
|
|
|
select parent_id from blade_menu where is_deleted = 0 |
|
|
|
|
and id in ( select menu_id from blade_role_menu where role_id in |
|
|
|
|
and id in ( |
|
|
|
|
select menu_id from blade_role_menu where role_id in |
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
) |
|
|
|
|
ORDER BY |
|
|
|
|
sort |
|
|
|
|
) |
|
|
|
|
) menu |
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
@ -413,10 +422,14 @@
|
|
|
|
|
blade_scope_api |
|
|
|
|
WHERE |
|
|
|
|
is_deleted = 0 |
|
|
|
|
AND menu_id IN ( select menu_id from blade_role_menu where role_id in |
|
|
|
|
AND |
|
|
|
|
( |
|
|
|
|
menu_id IN ( |
|
|
|
|
select menu_id from blade_role_menu where role_id in |
|
|
|
|
<foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
</foreach> |
|
|
|
|
) |
|
|
|
|
OR menu_id IN ( |
|
|
|
|
select parent_id from blade_menu where is_deleted = 0 |
|
|
|
|
and id in ( select menu_id from blade_role_menu where role_id in |
|
|
|
@ -424,6 +437,7 @@
|
|
|
|
|
#{item} |
|
|
|
|
</foreach> ) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
AND menu_id IS NOT NULL |
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|