From 0562ec1e83520d3a0fea4a61dca7e259a9c51da7 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Sun, 18 Jul 2021 10:11:27 +0800
Subject: [PATCH] 查询考试绑定的对应题目
---
src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
diff --git a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
index 73b194a..b3c76a0 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
@@ -18,10 +18,38 @@
</if>
</select>
+ <!--查询试卷绑定的题目-->
+ <select id="getEexPaperChoices" resultType="org.springblade.modules.exam.vo.ExamSubjectChoicesVO">
+ SELECT
+ esc.*
+ FROM
+ exam_subject_choices esc
+ LEFT JOIN exam_examination_subject exa ON esc.id = exa.subject_id
+ WHERE
+ 1=1
+ <if test="examSubjectChoices.id!=null and examSubjectChoices.id!=''">
+ and exa.examination_id = #{examSubjectChoices.id}
+ </if>
+ </select>
+
<!--ExamSubjectChoicesInfoMap 多表联查 一对多查询 -->
- <resultMap id="ExamSubjectChoicesInfoMap" type="org.springblade.modules.exam.vo.ExamSubjectChoicesVO" autoMapping="true">
+ <resultMap id="ExamSubjectChoicesInfoMap" type="org.springblade.modules.exam.vo.ExamSubjectChoicesVO">
<id property="id" column="id"/>
+ <id property="categoryId" column="category_id"/>
+ <id property="subjectName" column="subject_name"/>
+ <id property="choicesType" column="choices_type"/>
+ <id property="score" column="score"/>
+ <id property="analysis" column="analysis"/>
+ <id property="level" column="level"/>
+ <id property="creator" column="creator"/>
+ <id property="createDate" column="create_date"/>
+ <id property="modifier" column="modifier"/>
+ <id property="modifyDate" column="modify_date"/>
+ <id property="delFlag" column="del_flag"/>
+ <id property="applicationCode" column="application_code"/>
+ <id property="tenantCode" column="tenant_code"/>
+ <result column="id" property="id"/>
<collection property="examSubjectOptions" javaType="java.util.List" ofType="org.springblade.modules.exam.entity.ExamSubjectOption" autoMapping="true">
<id property="id" column="eso_id"/>
</collection>
--
Gitblit v1.9.3