From cc2624d08e422c36a4f93cc15d0ca0f0b7b4951a Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期一, 17 一月 2022 15:46:28 +0800
Subject: [PATCH] update 优化加载字典缓存数据

---
 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 5d9a185..8c2437e 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -75,9 +75,9 @@
                r.data_scope,
                r.status as role_status
         from sys_user u
-		    left join sys_dept d on u.dept_id = d.dept_id
-		    left join sys_user_role ur on u.user_id = ur.user_id
-		    left join sys_role r on r.role_id = ur.role_id
+            left join sys_dept d on u.dept_id = d.dept_id
+            left join sys_user_role ur on u.user_id = ur.user_id
+            left join sys_role r on r.role_id = ur.role_id
     </sql>
 
     <select id="selectPageUserList" parameterType="SysUser" resultMap="SysUserResult">
@@ -107,10 +107,6 @@
         <if test="user.deptId != null and user.deptId != 0">
             AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId},
             ancestors) ))
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="user.params.dataScope != null and user.params.dataScope != ''">
-            AND ( ${user.params.dataScope} )
         </if>
     </select>
 
@@ -142,10 +138,6 @@
             AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
             ancestors) ))
         </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="params.dataScope != null and params.dataScope != ''">
-            AND ( ${params.dataScope} )
-        </if>
     </select>
 
     <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
@@ -160,10 +152,6 @@
         </if>
         <if test="user.phonenumber != null and user.phonenumber != ''">
             AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="user.params.dataScope != null and user.params.dataScope != ''">
-            AND ( ${user.params.dataScope} )
         </if>
     </select>
 
@@ -180,10 +168,6 @@
         </if>
         <if test="user.phonenumber != null and user.phonenumber != ''">
             AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="user.params.dataScope != null and user.params.dataScope != ''">
-            AND ( ${user.params.dataScope} )
         </if>
     </select>
 

--
Gitblit v1.9.3