Commit 8f91a5cf by naan1993

更新sql

parent 243318f7
......@@ -23,7 +23,7 @@
<select id="getMenuIdsByRoleId" resultType="long">
select menuid from
relation where roleid = #{roleId}
sys_relation where roleid = #{roleId}
</select>
<select id="menuTreeList" resultType="com.stylefeng.guns.core.node.ZTreeNode">
......@@ -48,8 +48,8 @@
END
) as isOpen
FROM
menu m1
LEFT JOIN menu m2 ON m1.pcode = m2. CODE
sys_menu m1
LEFT join sys_menu m2 ON m1.pcode = m2. CODE
ORDER BY
m1.id ASC
</select>
......@@ -85,15 +85,15 @@
END
) "checked"
FROM
menu m1
sys_menu m1
LEFT JOIN
menu m2
sys_menu m2
ON m1.pcode = m2. CODE
left join (
SELECT
ID
FROM
menu
sys_menu
WHERE
ID IN
<foreach collection="list" index="index" item="i" open="("
......@@ -111,8 +111,8 @@
<select id="getResUrlsByRoleId" resultType="string">
select url from
relation rel
inner join menu m on rel.menuid = m.id
sys_relation rel
inner join sys_menu m on rel.menuid = m.id
where rel.roleid = #{roleId}
</select>
......@@ -134,19 +134,19 @@
m1.ismenu as ismenu,
m1.num as num
FROM
menu m1
LEFT JOIN menu m2 ON m1.pcode = m2. CODE
sys_menu m1
LEFT join sys_menu m2 ON m1.pcode = m2. CODE
INNER JOIN (
SELECT
ID
FROM
menu
sys_menu
WHERE
ID IN (
SELECT
menuid
FROM
relation rela
sys_relation rela
WHERE
rela.roleid IN
<foreach collection="list" index="index" item="i" open="(" separator="," close=")">
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.stylefeng.guns.modular.system.dao.NoticeDao">
<select id="list" resultType="map">
select * from sys_notice2
select * from sys_notice
<if test="condition != null and condition != ''">
where title like CONCAT('%',#{condition},'%') or content like CONCAT('%',#{condition},'%')
</if>
......
......@@ -47,12 +47,12 @@
END
) "checked"
FROM
role r
sys_role r
LEFT JOIN (
SELECT
ID
FROM
role
sys_role
WHERE
ID IN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment