From cc3a57f2a466a76a808b8171fdcfa5d10263e4eb Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 18 Jan 2022 14:42:50 +0800
Subject: [PATCH] 1.考试查询修改 2.新增登录情况导出 3.题库查询修改

---
 src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
index dfc1bce..6478a01 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -130,10 +130,16 @@
         <if test="paper.deptId!=null and paper.deptId!=''">
             and bd.id = #{paper.deptId}
         </if>
+        <if test="paper.deptName!=null and paper.deptName!=''">
+            and bd.dept_name like concat('%',#{paper.deptName},'%')
+        </if>
+        <if test="paper.examTime!=null and paper.examTime!=''">
+            and date_format(ke.start_time,'%Y-%m-%d') = #{paper.examTime}
+        </if>
         <if test="paper.auditStatus!=null and paper.auditStatus!=''">
             and audit_status = #{paper.auditStatus}
         </if>
-        order by start_time desc
+        order by ke.start_time desc,ke.id desc
     </select>
 
     <select id="PagerSubject" resultMap="PagerSubjectAnswer">
@@ -237,7 +243,7 @@
 			exam_score es
 		on
 		es.apply_id = str.id
-        where str.user_id = #{userId}
+        where str.user_id = #{examPaper.userId}
         and bu.is_train = 1
         and (str.is_exam = 1 or str.is_exam = 3)
         and ke.audit_status = 1

--
Gitblit v1.9.3