From eb87229ee9edfcfdcc326d71e5467658aaf37930 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期六, 29 一月 2022 09:23:27 +0800
Subject: [PATCH] update 修正脚本错误

---
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index 2f56544..b1ce3f8 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -30,6 +30,9 @@
     <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult">
         <include refid="selectDeptVo"/>
         where d.del_flag = '0'
+        <if test="deptId != null and deptId != 0">
+            AND dept_id = #{deptId}
+        </if>
         <if test="parentId != null and parentId != 0">
             AND parent_id = #{parentId}
         </if>
@@ -39,17 +42,13 @@
         <if test="status != null and status != ''">
             AND status = #{status}
         </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="params.dataScope != null and params.dataScope != ''">
-            AND ( ${params.dataScope} )
-        </if>
         order by d.parent_id, d.order_num
     </select>
 
-    <select id="selectDeptListByRoleId" resultType="Integer">
+    <select id="selectDeptListByRoleId" resultType="Long">
         select d.dept_id
         from sys_dept d
-        left join sys_role_dept rd on d.dept_id = rd.dept_id
+            left join sys_role_dept rd on d.dept_id = rd.dept_id
         where rd.role_id = #{roleId}
             <if test="deptCheckStrictly">
                 and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId})

--
Gitblit v1.9.3