From 07ef4ae0fc211fbe6006c525002ed65ce854a1f2 Mon Sep 17 00:00:00 2001
From: qirong <2032486488@qq.com>
Date: 星期四, 30 十一月 2023 14:02:48 +0800
Subject: [PATCH] 重置试卷

---
 src/main/resources/mapper/ExamTemplatesMapper.xml |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/ExamTemplatesMapper.xml b/src/main/resources/mapper/ExamTemplatesMapper.xml
index 817a36f..9329f2b 100644
--- a/src/main/resources/mapper/ExamTemplatesMapper.xml
+++ b/src/main/resources/mapper/ExamTemplatesMapper.xml
@@ -54,6 +54,28 @@
         </where>
     </select>
 
+    <select id="getByadmins" resultMap="BaseResultMap" parameterType="com.mindskip.xzs.domain.vo.ExamTemplatesVO">
+        select
+        DISTINCT  e.id
+        , e.name, e.paper_type, e.suggest_time, e.title_name, e.ctime, e.status, e.menu_ids,e.start_time,e.end_time
+        from t_exam_templates e
+        left join t_exam_templates_user u on e.id = u.templates_id
+        <where>
+            <if test="status != null">
+                and e.status = 0
+            </if>
+            <if test="status == null">
+                and e.status is null
+            </if>
+            <if test="userId != null">
+                and u.user_id = #{userId}
+            </if>
+            <if test="now !=null">
+                and #{now} between e.start_time and e.end_time
+            </if>
+        </where>
+    </select>
+
     <select id="getById" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List"/>

--
Gitblit v1.8.0