From 8853292babb2ad94de4a3207966f1e83b767cd2d Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Sun, 17 Sep 2023 16:38:34 +0800
Subject: [PATCH] 新增流程节点进程查询接口

---
 src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml |   10 +++++++++-
 1 files changed, 9 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 17f6af0..b862992 100644
--- a/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
+++ b/src/main/java/org/springblade/modules/exam/mapper/ExamSubjectChoicesMapper.xml
@@ -46,6 +46,7 @@
         <id property="categoryId" column="category_id"/>
         <id property="subjectName" column="subject_name"/>
         <id property="choicesType" column="choices_type"/>
+        <id property="answer" column="answer"/>
         <id property="score" column="score"/>
         <id property="level" column="level"/>
         <result column="id" property="id"/>
@@ -58,7 +59,7 @@
     <!--题目详情信息-->
     <select id="selectExamSubjectChoicesInfo" resultMap="ExamSubjectChoicesInfoMap">
         SELECT
-        esc.id,esc.category_id,esc.subject_name,esc.choices_type,esc.score,esc.level,
+        esc.id,esc.category_id,esc.subject_name,esc.choices_type,esc.score,esc.level,esc.answer,
         eso.id eso_id,eso.subject_choices_id,eso.option_name,eso.option_content,eso.creator,
         eso.create_date,eso.modifier,eso.modify_date,eso.del_flag,eso.application_code,eso.tenant_code
         FROM
@@ -82,4 +83,11 @@
     <delete id="removeBySubjectId">
         delete from exam_subject_option where subject_choices_id = #{id}
     </delete>
+
+    <select id="getExamSubjectChoicesList" resultType="java.lang.String" >
+        SELECT id FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 0 ORDER BY RAND( ) LIMIT 50 ) a UNION ALL
+        SELECT id FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 1 ORDER BY RAND( ) LIMIT 20 ) b UNION ALL
+        SELECT id FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 2 ORDER BY RAND( ) LIMIT 40 ) c UNION ALL
+        SELECT id FROM ( SELECT * FROM exam_subject_choices WHERE choices_type = 3 ORDER BY RAND( ) LIMIT 10 ) d
+    </select>
 </mapper>

--
Gitblit v1.9.3