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

菜单重复bug

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