From cc057177b2fb17aee9a173a6adbabdc578fd74c7 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 06 Dec 2021 10:30:44 +0800
Subject: [PATCH] 1.许可

---
 src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 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 b3c76a0..d2842fe 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
@@ -30,6 +30,12 @@
         <if test="examSubjectChoices.id!=null and  examSubjectChoices.id!=''">
             and exa.examination_id = #{examSubjectChoices.id}
         </if>
+        <if test="examSubjectChoices.subjectName!=null and  examSubjectChoices.subjectName!=''">
+            and esc.subject_name like concat('%', #{examSubjectChoices.subjectName},'%')
+        </if>
+        <if test="examSubjectChoices.choicesType!=null and  examSubjectChoices.choicesType!=''">
+            and esc.choices_type = #{examSubjectChoices.choices_type}
+        </if>
     </select>
 
 
@@ -41,6 +47,7 @@
         <id property="choicesType" column="choices_type"/>
         <id property="score" column="score"/>
         <id property="analysis" column="analysis"/>
+        <id property="answer" column="answer"/>
         <id property="level" column="level"/>
         <id property="creator" column="creator"/>
         <id property="createDate" column="create_date"/>
@@ -49,6 +56,7 @@
         <id property="delFlag" column="del_flag"/>
         <id property="applicationCode" column="application_code"/>
         <id property="tenantCode" column="tenant_code"/>
+        <id property="tktype" column="tktype"/>
         <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"/>
@@ -74,4 +82,13 @@
             and esc.id = #{examSubjectChoices.id}
         </if>
     </select>
+
+    <update id="updateChoicesValue">
+        update exam_subject_choices set score = #{value} where id = #{id}
+    </update>
+
+    <!--根据 题目id 删除选项-->
+    <delete id="removeBySubjectId">
+        delete from exam_subject_option where subject_choices_id = #{id}
+    </delete>
 </mapper>

--
Gitblit v1.9.3