From 65c6651f36f292674ad5f3966937dd22e5968326 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期二, 16 七月 2024 09:07:35 +0800
Subject: [PATCH] feat:补考保留最高分
---
src/main/resources/mapper/ExamTemplatesMapper.xml | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/main/resources/mapper/ExamTemplatesMapper.xml b/src/main/resources/mapper/ExamTemplatesMapper.xml
index cfb27e4..8dffc26 100644
--- a/src/main/resources/mapper/ExamTemplatesMapper.xml
+++ b/src/main/resources/mapper/ExamTemplatesMapper.xml
@@ -60,6 +60,8 @@
, e.name, e.paper_type, e.suggest_time, e.title_name, e.ctime, e.status, e.menu_ids,e.start_time,e.end_time, e.create_user
from t_exam_templates e
left join t_exam_templates_user u on e.id = u.templates_id
+ LEFT JOIN t_exam_templates_subject ts ON e.id = ts.templates_id
+ LEFT JOIN t_subject s ON ts.subject_id = s.id
<where>
<if test="status != null">
and e.status = 0
@@ -73,10 +75,20 @@
<if test="deptId != null and deptId.size() > 0">
and e.dept_id in <foreach collection="deptId" item="item" separator="," open="(" close=")"> #{item} </foreach>
</if>
+ <if test="name != null and name != ''">
+ and INSTR(e.name, #{name})
+ </if>
+ <if test="subjectId != null and subjectId.length > 0">
+ and s.id in <foreach collection="subjectId" item="item" separator="," open="(" close=")"> #{item} </foreach>
+ </if>
+ <if test="period != null and period.size() > 0">
+ and e.ctime between #{period[0]} and #{period[1]}
+ </if>
<if test="now !=null">
and #{now} between e.start_time and e.end_time
</if>
</where>
+ GROUP BY e.id
</select>
<select id="getById" resultMap="BaseResultMap">
--
Gitblit v1.8.0