From fefb239a27b62daf8e0b4189b0167481ce24207e Mon Sep 17 00:00:00 2001
From: xiaoCJ <406612557@qq.com>
Date: Mon, 29 Apr 2024 15:16:44 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E9=85=8D?=
 =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=92=8Cmapper=20xml?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../financial_bigdata/entity/tea_dto/TrainingDto.java       | 2 ++
 src/main/resources/mapper/StuTrainingMapper.xml             | 6 ++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TrainingDto.java b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TrainingDto.java
index 402f5ec..866366c 100644
--- a/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TrainingDto.java
+++ b/src/main/java/com/sztzjy/financial_bigdata/entity/tea_dto/TrainingDto.java
@@ -15,6 +15,8 @@ import java.math.BigDecimal;
 public class TrainingDto {
     @ApiModelProperty("案例名称")
     private String name;
+    @ApiModelProperty("案例题ID")
+    private String caseId;
     @ApiModelProperty("所属任务")
     private String task;
     @ApiModelProperty("步骤数量")
diff --git a/src/main/resources/mapper/StuTrainingMapper.xml b/src/main/resources/mapper/StuTrainingMapper.xml
index 9bc0ae9..4e624b9 100644
--- a/src/main/resources/mapper/StuTrainingMapper.xml
+++ b/src/main/resources/mapper/StuTrainingMapper.xml
@@ -481,18 +481,20 @@
   <resultMap id="DtoBaseResultMap" type="com.sztzjy.financial_bigdata.entity.tea_dto.TrainingDto">
     <result column="title" jdbcType="VARCHAR" property="name" />
     <result column="chapter_name" jdbcType="VARCHAR" property="task" />
+    <result column="case_id" jdbcType="VARCHAR" property="caseId" />
     <result column="total_steps_count" jdbcType="INTEGER" property="count" />
     <result column="total_steps_score" jdbcType="DECIMAL" property="score" />
+    <result column="total_steps_score" jdbcType="DECIMAL" property="score" />
   </resultMap>
 
   <select id="selectTrainingByIds" parameterType="com.sztzjy.financial_bigdata.entity.StuTraining" resultMap="DtoBaseResultMap">
-    SELECT SUM(sqs.score) AS total_steps_score, COUNT(sqs.case_step_id) AS total_steps_count, sq.title, scc.chapter_name
+    SELECT SUM(sqs.score) AS total_steps_score, sqs.case_id,COUNT(sqs.case_step_id) AS total_steps_count, sq.title, scc.chapter_name
     FROM sys_case_question_step sqs
            JOIN sys_case_question sq ON sqs.case_id = sq.case_id
            JOIN sys_course_chapter scc ON sq.chapter_id = scc.chapter_id
     WHERE sqs.case_id IN <foreach item="item" collection="ids" open="(" separator="," close=")">
     #{item}
   </foreach>
-    GROUP BY sq.title, scc.chapter_name;
+    GROUP BY sq.title, scc.chapter_name,sqs.case_id;
   </select>
 </mapper>
\ No newline at end of file