From ab33cd64a1c4f4c59b3af97dd9b6391126646d19 Mon Sep 17 00:00:00 2001
From: ZhuDongming <773644075@qq.com>
Date: Mon, 22 Jun 2020 17:33:13 +0800
Subject: [PATCH] update
---
src/main/resources/mapper/RoleMenuMapper.xml | 36 ++++++++++++------------------------
1 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/src/main/resources/mapper/RoleMenuMapper.xml b/src/main/resources/mapper/RoleMenuMapper.xml
index e75534b..f1db579 100644
--- a/src/main/resources/mapper/RoleMenuMapper.xml
+++ b/src/main/resources/mapper/RoleMenuMapper.xml
@@ -49,32 +49,20 @@
</where>
</sql>
- <select id="getRoleMenuList" resultMap="BaseResultMap">
+
+ <select id="getChannels" resultType="java.lang.Integer">
select
- rm.*,
- r.role_name,
- m.menu_name
- from role_menu rm
- left join role r on rm.role_id = r.id
- left join menu m on rm.menu_id = m.id
- <if test="_parameter != null">
- <include refid="Example_Where_Clause"/>
- </if>
- <if test="orderByClause != null">
- order by ${orderByClause}
- </if>
+ distinct
+ channel_id
+ from role_menu
+ where role_id = #{roleId}
</select>
- <update id="updateByPrimaryKey" parameterType="com.moral.entity.RoleMenu" >
- update role_menu
- set role_id = #{roleId,jdbcType=INTEGER},
- menu_id = #{menuId,jdbcType=INTEGER}
- where id = #{id,jdbcType=INTEGER}
- </update>
-
- <delete id="deleteByPrimaryKeyOwn" parameterType="java.lang.Integer" >
- delete from role_menu
- where id = #{id,jdbcType=INTEGER}
- </delete>
+ <select id="getMenus" resultType="java.lang.Integer">
+ select
+ menu_id
+ from role_menu
+ where role_id = #{roleId}
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0