he2802 2 år sedan
förälder
incheckning
55a1fd0947

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/vo/QuestionVo.java

@@ -8,6 +8,8 @@ import com.zhongzheng.modules.exam.domain.ExamKnowledge;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 
@@ -120,4 +122,12 @@ public class QuestionVo {
 	private Long orderGoodsId;
 	@ApiModelProperty("收藏题目ID")
 	private Long collectQuestionId;
+	/** 分值 */
+	@Excel(name = "分值")
+	@ApiModelProperty("分值")
+	private BigDecimal score;
+	/** 多选 每项部分分,默认0分则不开启 */
+	@Excel(name = "多选 每项部分分,默认0分则不开启")
+	@ApiModelProperty("多选 每项部分分,默认0分则不开启")
+	private BigDecimal partScore;
 }

+ 8 - 2
zhongzheng-system/src/main/resources/mapper/modules/bank/ExamSimulateMapper.xml

@@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="knowledgeIds" column="knowledge_ids"/>
         <result property="publishStatus" column="publish_status"/>
         <result property="code" column="code"/>
+        <result property="score" column="score"/>
+        <result property="partScore" column="part_score"/>
     </resultMap>
 
     <select id="getKnowledQuestionList" parameterType="com.zhongzheng.modules.bank.bo.ExamSimulateQueryBo" resultType="Long">
@@ -154,9 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="queryBatchList" parameterType="com.zhongzheng.modules.bank.bo.ExamSimulateQueryBo" resultMap="QuestionResultVo">
         SELECT
-        q.*
+        q.*, eq.part_score,
+        eq.score
         FROM
-            exam_simulate_question esq left join question q on  esq.question_id = q.question_id where esq.simulate_exam_id = #{simulateExamId} ORDER BY esq.sort
+            exam_simulate_question esq left join question q on  esq.question_id = q.question_id
+            left join exam_simulate es on  es.simulate_exam_id = esq.simulate_exam_id
+            left join exam_question eq on  eq.question_id = esq.question_id and eq.exam_id = es.exam_id
+        where esq.simulate_exam_id = #{simulateExamId} ORDER BY esq.sort
 
     </select>
 </mapper>