提交 c2e10ab2 编写于 作者: cxt104926's avatar cxt104926

菜单重复bug

上级 d274e217
......@@ -31,7 +31,7 @@ public class MenuVO {
private String pid;
@ApiModelProperty("父级名称")
private String pName;
private String parentName;
@ApiModelProperty("菜单类型(M:目录,C:菜单,B:按钮)")
private String menuType;
......
......@@ -2,23 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.stu.stusystem.mapper.system.MenuMapper">
<select id="getMenuPage" resultType="com.stu.stusystem.service.system.vo.MenuVO">
SELECT m.id,
m.icon_img AS iconImg,
m.name,
m.url,
m.code,
m.pid,
p.name AS pName,
m.menu_type AS menuType,
m.is_visible AS isVisible,
m.order_num AS orderNum
SELECT p.id,
p.icon_img AS iconImg,
p.name,
p.url,
p.code,
p.pid,
m.name AS parentName,
p.menu_type AS menuType,
p.is_visible AS isVisible,
p.order_num AS orderNum
FROM menu m
left join menu p on p.pid = m.id
RIGHT JOIN menu p ON p.pid = m.id
<where>
<if test="name != null and name != ''">
m.name = #{name}
p.name = #{name}
</if>
</where>
order by id ASC
order by p.id ASC
</select>
</mapper>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册