From 9036370d677abc7307e5ccc942ef71f1bb118b4a Mon Sep 17 00:00:00 2001
From: 疯狂的狮子li <15040126243@163.com>
Date: 星期二, 30 十一月 2021 17:34:31 +0800
Subject: [PATCH] remove 删除 jjwt 无用依赖

---
 ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml |   40 +++++++++++++++++++++++-----------------
 1 files changed, 23 insertions(+), 17 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
index 236ae20..5d9a185 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>
@@ -117,6 +120,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>
@@ -148,16 +154,16 @@
              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
-        where u.del_flag = '0' and r.role_id = #{roleId}
-        <if test="userName != null and userName != ''">
-            AND u.user_name like concat('%', #{userName}, '%')
+        where u.del_flag = '0' and r.role_id = #{user.roleId}
+        <if test="user.userName != null and user.userName != ''">
+            AND u.user_name like concat('%', #{user.userName}, '%')
         </if>
-        <if test="phonenumber != null and phonenumber != ''">
-            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        <if test="user.phonenumber != null and user.phonenumber != ''">
+            AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
         </if>
         <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="params.dataScope != null and params.dataScope != ''">
-            AND ( ${params.dataScope} )
+        <if test="user.params.dataScope != null and user.params.dataScope != ''">
+            AND ( ${user.params.dataScope} )
         </if>
     </select>
 
@@ -167,28 +173,28 @@
              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
-        where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
-        and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{roleId})
-        <if test="userName != null and userName != ''">
-            AND u.user_name like concat('%', #{userName}, '%')
+        where u.del_flag = '0' and (r.role_id != #{user.roleId} or r.role_id IS NULL)
+        and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and ur.role_id = #{user.roleId})
+        <if test="user.userName != null and user.userName != ''">
+            AND u.user_name like concat('%', #{user.userName}, '%')
         </if>
-        <if test="phonenumber != null and phonenumber != ''">
-            AND u.phonenumber like concat('%', #{phonenumber}, '%')
+        <if test="user.phonenumber != null and user.phonenumber != ''">
+            AND u.phonenumber like concat('%', #{user.phonenumber}, '%')
         </if>
         <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        <if test="params.dataScope != null and params.dataScope != ''">
-            AND ( ${params.dataScope} )
+        <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