From 925219ebfda2a480df99ca06a13033c78ae8d81f Mon Sep 17 00:00:00 2001
From: huliguo <2023611923@qq.com>
Date: 星期五, 30 五月 2025 18:08:16 +0800
Subject: [PATCH] 权限管理+用户管理

---
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index cf439f6..7eb5d87 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -62,7 +62,7 @@
 		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
 			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
 		from sys_dept d
-		where d.dept_id = #{deptId}
+		where d.dept_id = #{deptId} and del_flag = '0'
 	</select>
     
     <select id="checkDeptExistUser" parameterType="Long" resultType="int">
@@ -86,7 +86,28 @@
 	    <include refid="selectDeptVo"/>
 		where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
 	</select>
-    
+    <select id="page" resultType="com.ruoyi.system.pojo.vo.SysDeptPageVO">
+		select
+			dept_id,dept_name
+		from sys_dept
+		where
+			del_flag='0'
+		<if test="name!=null and name!='' ">
+			and `dept_name` like concat('%',#{name},'%')
+		</if>
+	</select>
+	<select id="selectDeptByName" resultType="com.ruoyi.common.core.domain.entity.SysDept">
+		select dept_id from sys_dept where del_flag='0' and dept_name like #{name}
+	</select>
+    <select id="getDeptList" resultType="com.ruoyi.system.pojo.vo.SysDeptPageVO">
+		select
+			dept_id,dept_name
+		from sys_dept
+		where
+			del_flag='0'
+
+	</select>
+
     <insert id="insertDept" parameterType="SysDept">
  		insert into sys_dept(
  			<if test="deptId != null and deptId != 0">dept_id,</if>
@@ -151,7 +172,8 @@
         	#{deptId}
         </foreach>
 	</update>
-	
+	<update id="updateDeptName">update sys_dept set dept_name = #{sysDept.deptName} where dept_id = #{sysDept.deptId}</update>
+
 	<delete id="deleteDeptById" parameterType="Long">
 		update sys_dept set del_flag = '2' where dept_id = #{deptId}
 	</delete>

--
Gitblit v1.7.1