Browse Source

按钮接口增加排序

test
smallchill 6 years ago
parent
commit
81ecb884d3
  1. 78
      blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml

78
blade-service/blade-system/src/main/java/org/springblade/system/mapper/MenuMapper.xml

@ -67,46 +67,48 @@
</select>
<select id="buttons" resultMap="menuResultMap">
SELECT
id,
parent_id,
`code`,
`name`,
alias,
path,
source,
action,
sort
FROM
blade_menu
WHERE
is_deleted = 0 and id IN (
SELECT parent_id FROM blade_menu
WHERE ( category = 2 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>
) ) )
SELECT * FROM (
SELECT
id,
parent_id,
`code`,
`name`,
alias,
path,
source,
action,
sort
FROM
blade_menu
WHERE
is_deleted = 0 and id IN (
SELECT parent_id FROM blade_menu
WHERE ( category = 2 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>
) ) )
UNION ALL
UNION ALL
SELECT
id,
parent_id,
`code`,
`name`,
alias,
path,
source,
action,
sort
FROM
blade_menu
WHERE
is_deleted = 0 and category = 2 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>)
SELECT
id,
parent_id,
`code`,
`name`,
alias,
path,
source,
action,
sort
FROM
blade_menu
WHERE
is_deleted = 0 and category = 2 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>)
) menu ORDER BY sort
</select>
<select id="grantTree" resultMap="treeNodeResultMap">

Loading…
Cancel
Save