From f8ec379d94c8ccbdadef657240429fe7c7f257ab Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Sat, 09 Oct 2021 17:57:51 +0800
Subject: [PATCH] 题目生成记录优化,单个新增修改为sql批量新增

---
 src/main/java/org/springblade/modules/system/mapper/UserMapper.xml |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
index 3cb197d..41f3167 100644
--- a/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
+++ b/src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -186,6 +186,7 @@
           and account = #{param2}
           and password = #{param3}
           and is_deleted = 0
+          and status = 1
     </select>
 
     <select id="exportUser" resultType="org.springblade.modules.system.excel.UserExcel">
@@ -331,12 +332,17 @@
             blade_dept bd
             on
             bu.dept_id = bd.id
+            left join
+            blade_role br
+            on
+            br.id = bu.role_id
             where
             bu.is_deleted = 0
             and bu.status = 1
-            and bu.examination_type != 1
+            and (bu.examination_type != 1 or bu.examination_type is null)
             and (hold = 2 or hold = 3)
             and bd.id = #{user.deptId}
+            and br.role_alias = '保安'
             <if test="user.examType==1">
                 and bu.is_apply != 1
             </if>
@@ -510,7 +516,10 @@
 
     <!--查询账号相同的数量-->
     <select id="selectCountAccount" resultType="java.lang.Integer">
-        select count(*) from blade_user where account = #{account}
+        select count(*) from blade_user where 1=1
+        and status = 1
+        and is_deleted = 0
+        and account = #{account}
     </select>
 
     <!--查询当前部门名称及父级部门名称-->

--
Gitblit v1.9.3