|
|
@ -139,44 +139,23 @@ |
|
|
|
|
|
|
|
|
|
|
|
<select id="allButtons" resultMap="menuResultMap"> |
|
|
|
<select id="allButtons" resultMap="menuResultMap"> |
|
|
|
SELECT |
|
|
|
SELECT |
|
|
|
* |
|
|
|
id, |
|
|
|
|
|
|
|
parent_id, |
|
|
|
|
|
|
|
CODE, |
|
|
|
|
|
|
|
NAME, |
|
|
|
|
|
|
|
alias, |
|
|
|
|
|
|
|
path, |
|
|
|
|
|
|
|
source, |
|
|
|
|
|
|
|
action, |
|
|
|
|
|
|
|
sort |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
|
|
|
|
blade_menu |
|
|
|
|
|
|
|
WHERE |
|
|
|
( |
|
|
|
( |
|
|
|
SELECT |
|
|
|
category = 2 OR id IN ( SELECT parent_id FROM blade_menu WHERE is_deleted = 0 AND category = 2 ) |
|
|
|
id, |
|
|
|
) |
|
|
|
parent_id, |
|
|
|
AND is_deleted = 0 |
|
|
|
CODE, |
|
|
|
ORDER BY sort |
|
|
|
NAME, |
|
|
|
|
|
|
|
alias, |
|
|
|
|
|
|
|
path, |
|
|
|
|
|
|
|
source, |
|
|
|
|
|
|
|
action, |
|
|
|
|
|
|
|
sort |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
blade_menu |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
id IN ( SELECT parent_id FROM blade_menu WHERE is_deleted = 0 AND category = 2 ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
id, |
|
|
|
|
|
|
|
parent_id, |
|
|
|
|
|
|
|
CODE, |
|
|
|
|
|
|
|
NAME, |
|
|
|
|
|
|
|
alias, |
|
|
|
|
|
|
|
path, |
|
|
|
|
|
|
|
source, |
|
|
|
|
|
|
|
action, |
|
|
|
|
|
|
|
sort |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
blade_menu |
|
|
|
|
|
|
|
WHERE |
|
|
|
|
|
|
|
is_deleted = 0 |
|
|
|
|
|
|
|
AND category = 2 |
|
|
|
|
|
|
|
) menu |
|
|
|
|
|
|
|
ORDER BY |
|
|
|
|
|
|
|
sort |
|
|
|
|
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="buttons" resultMap="menuResultMap"> |
|
|
|
<select id="buttons" resultMap="menuResultMap"> |
|
|
|