From 05d651ca0168025ec451702f1df88dab4f2a9559 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期五, 10 五月 2024 17:58:19 +0800
Subject: [PATCH] feat:新增补考按钮
---
src/main/resources/mapper/QuestionSubjectMapper.xml | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/main/resources/mapper/QuestionSubjectMapper.xml b/src/main/resources/mapper/QuestionSubjectMapper.xml
index a647448..24ef74e 100644
--- a/src/main/resources/mapper/QuestionSubjectMapper.xml
+++ b/src/main/resources/mapper/QuestionSubjectMapper.xml
@@ -43,4 +43,25 @@
</foreach>
</insert>
-</mapper>
\ No newline at end of file
+ <delete id="removeSubjectId" parameterType="java.lang.Integer">
+ delete from t_question_subject
+ where subject_id = #{subjectId}
+ </delete>
+
+ <select id="getSubject" resultMap="BaseResultMap">
+ select qs.*,s.name as subName
+ from t_question_subject qs
+ left join t_subject s on qs.subject_id = s.id
+ where subject_id = #{id} and qs.deleted = 0 and s.deleted = 0
+ </select>
+
+ <select id="countQuestionNum" resultType="integer">
+ SELECT
+ count(distinct id)
+ FROM
+ t_question_subject
+ WHERE
+ subject_id IN <foreach collection="subjects" open="(" separator="," close=")" item="subjectId">#{subjectId}</foreach>
+ </select>
+
+</mapper>
--
Gitblit v1.8.0