From 790c2ba4a0b46edf191e3bac84931f796bd42b8f Mon Sep 17 00:00:00 2001
From: zhangf <1603559716@qq.com>
Date: 星期三, 24 七月 2024 09:02:49 +0800
Subject: [PATCH] 三方对接接口优化

---
 exam-system/src/main/resources/mapper/institutionaccess/ThStudyTrackMapper.xml |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyTrackMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyTrackMapper.xml
index 5364362..0e1ab9d 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyTrackMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyTrackMapper.xml
@@ -1,9 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.gkhy.exam.institutionalaccess.mapper.ThStudyTrackMapper">
-<select id="getUuidByStudyDetaiId" resultType="java.lang.String">
-    select uuid from th_study_track where study_detail_uuid = #{studyDetaiId}
-</select>
+    <select id="getUuidByStudyDetaiId" resultType="java.lang.String">
+        select uuid from th_study_track where study_detail_uuid = #{studyDetaiId}
+    </select>
+    <insert id="insertBatch">
+        INSERT INTO th_study_track (id,uuid,start_time, end_time,time_interval, study_detail_uuid) VALUES
+        <foreach collection="list" separator="," item="item">
+            (#{item.id},#{item.uuid},#{item.startTime},#{item.endTime},#{item.timeInterval},#{item.studyDetailUuid})
+        </foreach>
+    </insert>
+    <select id="getByStudyDetaiUuids" resultType="com.gkhy.exam.institutionalaccess.entity.ThStudyTrack" >
+        select id,uuid,start_time, end_time,time_interval, study_detail_uuid from th_study_track where 1=1 and study_detail_uuid in
+        <foreach collection="studyUuids" item="studyUuid" index ="index" open="(" close=")" separator=",">
+            #{studyUuid}
+        </foreach>
+    </select>
 
 </mapper>
 

--
Gitblit v1.9.2