From 29cc9da9349c893905407a2b971c4d9d90811bc8 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期六, 08 一月 2022 19:15:16 +0800
Subject: [PATCH] update hutool 引入改为 bom 依赖项引入

---
 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml |   26 ++++++++------------------
 1 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 5e11278..62ee4e1 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -86,6 +86,9 @@
         sys_user u
         left join sys_dept d on u.dept_id = d.dept_id
         where u.del_flag = '0'
+        <if test="user.userId != null and user.userId != 0">
+            AND u.user_id = #{user.userId}
+        </if>
         <if test="user.userName != null and user.userName != ''">
             AND u.user_name like concat('%', #{user.userName}, '%')
         </if>
@@ -105,10 +108,6 @@
             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>
 
     <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
@@ -117,6 +116,9 @@
         sys_user u
         left join sys_dept d on u.dept_id = d.dept_id
         where u.del_flag = '0'
+        <if test="userId != null and userId != 0">
+            AND u.user_id = #{userId}
+        </if>
         <if test="userName != null and userName != ''">
             AND u.user_name like concat('%', #{userName}, '%')
         </if>
@@ -136,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">
@@ -154,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>
 
@@ -175,20 +169,16 @@
         <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>
 
     <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
         <include refid="selectUserVo"/>
-        where u.user_name = #{userName}
+        where u.del_flag = '0' and u.user_name = #{userName}
     </select>
 
     <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
         <include refid="selectUserVo"/>
-        where u.user_id = #{userId}
+        where u.del_flag = '0' and u.user_id = #{userId}
     </select>
 
 

--
Gitblit v1.9.3