From 61f0ed42abb8b3a270f3dcefeff988da5e73a5fe Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期六, 09 九月 2023 11:55:05 +0800
Subject: [PATCH] 修改bug
---
user-server/src/main/resources/mapper/RoleManangeMapper.xml | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/user-server/src/main/resources/mapper/RoleManangeMapper.xml b/user-server/src/main/resources/mapper/RoleManangeMapper.xml
index f8db203..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
@@ -108,6 +124,15 @@
and menu_id = #{menuId}
and ${type} = 1
</select>
+ <select id="getAllInterfaces" resultType="java.util.Map">
+ 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