From 62eb499b0c969f246d3245d1429a97da4de1ce28 Mon Sep 17 00:00:00 2001
From: 钟日健 <arsn163@163.com>
Date: Mon, 01 Jun 2026 20:46:13 +0800
Subject: [PATCH] feat: 成绩查询增加年龄查询返回

---
 src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml |   26 ++++++++++++++++++++++++--
 1 files changed, 24 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 bd10eaa..b07f59a 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamPaperMapper.xml
@@ -103,7 +103,8 @@
             ke.*,
             bu.real_name realName,
             bd.dept_name deptName,
-            bu1.real_name confirmUserName
+            bu1.real_name confirmUserName,
+            bu2.real_name auditUserName
         FROM
             ksxt_exam ke
         left join
@@ -118,6 +119,10 @@
             blade_user bu1
         on
             ke.confirm_user = bu1.id
+        left join
+            blade_user bu2
+        on
+            ke.audit_user = bu2.id
         where
         1=1
         <if test="paper.examType!=null and paper.examType!=''">
@@ -592,10 +597,27 @@
             (
                 SELECT * FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 0 ORDER BY RAND( ) LIMIT 70 ) a UNION ALL
                 SELECT * FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 1 ORDER BY RAND( ) LIMIT 10 ) b UNION ALL
-                SELECT * FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 2 ORDER BY RAND( ) LIMIT 20 ) c UNION ALL
+                SELECT * FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 2 ORDER BY RAND( ) LIMIT 20 ) c
             ) esc
             LEFT JOIN exam_subject_option eso ON esc.id = eso.subject_choices_id
     </select>
+    <select id="getList" resultType="org.springblade.modules.exam.vo.ExamPaperVO">
+        SELECT * FROM ksxt_exam
+        where 1=1
+        <if test="vo.examTime != null and vo.examTime != ''">
+            AND DATE_FORMAT(start_time,'%Y-%m-%d') = DATE_FORMAT(#{vo.examTime},'%Y-%m-%d')
+        </if>
+        ORDER BY start_time DESC
+    </select>
+    <select id="getLatest" resultType="org.springblade.modules.exam.vo.ExamPaperVO">
+        SELECT * FROM ksxt_exam
+        where 1=1
+        <if test="vo.examTime != null and vo.examTime != ''">
+            AND DATE_FORMAT(start_time,'%Y-%m-%d') = DATE_FORMAT(#{vo.examTime},'%Y-%m-%d')
+        </if>
+        ORDER BY start_time DESC
+        LIMIT 1
+    </select>
 
 
 </mapper>

--
Gitblit v1.9.3