From e29f147aab5b0b0b794d611b522b67b94423e3cf Mon Sep 17 00:00:00 2001 From: Fixiaobai <fixiaobai@163.com> Date: 星期四, 07 九月 2023 17:56:57 +0800 Subject: [PATCH] 修改bug --- user-server/src/main/resources/mapper/RoleManangeMapper.xml | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/user-server/src/main/resources/mapper/RoleManangeMapper.xml b/user-server/src/main/resources/mapper/RoleManangeMapper.xml index a269bfa..7f5afb0 100644 --- a/user-server/src/main/resources/mapper/RoleManangeMapper.xml +++ b/user-server/src/main/resources/mapper/RoleManangeMapper.xml @@ -17,15 +17,30 @@ #{createTime} ) </insert> + <insert id="insertInterfaceList"> + insert + interface_info (id,name,url,menu_id,type,state) + values + <foreach collection="interfaceList" item="m" separator=","> + (#{m.id},#{m.name},#{m.url},#{m.menuId},#{m.type},1) + </foreach> + </insert> <update id="updateRoleState"> UPDATE role SET state = 0 WHERE (id = #{id}) </update> + <update id="updateRoleMenuStateByRoleId"> + UPDATE role_menu + SET state = 0 + where role_id = #{id} + and menu_id !=39 + </update> <delete id="deleteRoleMenuByRoleId"> delete from role_menu where role_id = #{id} + and menu_id !=39 </delete> <select id="getAssertName" resultType="com.yuanchu.limslaboratory.pojo.RoleInfo"> select id @@ -95,6 +110,7 @@ <select id="getUserListRole" resultType="map"> SELECT CONCAT(r.`id`, '') id, r.`name` FROM role r + where state!=0 </select> <select id="selctInterFaceType" resultType="java.util.Map"> select type, menu_id menuId @@ -109,9 +125,14 @@ and ${type} = 1 </select> <select id="getAllInterfaces" resultType="java.util.Map"> - select name,url + select name, url from interface_info </select> + <select id="getRoleMenuByRoleId" resultType="com.yuanchu.limslaboratory.pojo.RoleMenu"> + select id + from role_menu + where role_id = #{roleId} + </select> <resultMap id="roleAndMenuById" type="com.yuanchu.limslaboratory.pojo.dto.RoleAndMenuDto"> <result property="roleName" column="roleName"/> <result property="createTime" column="createTime"/> -- Gitblit v1.9.3