From 85ae68bdbd7e373fb6f3e6f5eb04c57e3d86efd0 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期三, 16 十月 2024 10:28:33 +0800
Subject: [PATCH] 补全缺失字段

---
 exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThCourseChapterVO.java        |    2 ++
 update.sql                                                                                         |    2 +-
 exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyAuthVO.java            |    6 ++++++
 exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/resp/ThCourseChapterRespDTO.java |    2 ++
 exam-system/src/main/resources/mapper/institutionaccess/ThStudyAuthMapper.xml                      |    6 +++---
 exam-system/src/main/resources/mapper/institutionaccess/ThCourseChapterMapper.xml                  |    6 ++++--
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/resp/ThCourseChapterRespDTO.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/resp/ThCourseChapterRespDTO.java
index df683b0..5a6e936 100644
--- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/resp/ThCourseChapterRespDTO.java
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/resp/ThCourseChapterRespDTO.java
@@ -20,6 +20,8 @@
     //视频路径
     private String url;
     private Integer serialno;
+    //讲师
+    private String teacher;
 
     private List<ThCourseChapterRespDTO> children;
 
diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThCourseChapterVO.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThCourseChapterVO.java
index af09f4f..41bc157 100644
--- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThCourseChapterVO.java
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThCourseChapterVO.java
@@ -22,4 +22,6 @@
     private Long institutionId;
     private String courseUuid;
     private Integer serialno;
+    //讲师
+    private String teacher;
 }
diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyAuthVO.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyAuthVO.java
index 258c5b2..f71b53f 100644
--- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyAuthVO.java
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/model/vo/ThStudyAuthVO.java
@@ -1,6 +1,7 @@
 package com.gkhy.exam.institutionalaccess.model.vo;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import java.time.LocalDateTime;
@@ -17,4 +18,9 @@
     private Byte faceType;
     private String studyDetailUuid;
     private String authVideo;
+
+    @ApiModelProperty("认证ip")
+    private String ip;
+    @ApiModelProperty("认证mac地址")
+    private String mac;
 }
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThCourseChapterMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThCourseChapterMapper.xml
index 9af851c..5745bf8 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThCourseChapterMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThCourseChapterMapper.xml
@@ -15,7 +15,8 @@
                cc.course_uuid,
                cc.parent_uuid,
                cc.serialno,
-               cc.url
+               cc.url,
+               cc.teacher
                from th_course_chapter cc
                where cc.del_flag = 0 and cc.course_uuid in
         <foreach collection="courseUuids" item="courseUuid"  open="(" close=")" separator=",">
@@ -48,7 +49,8 @@
         cc.course_uuid,
         cc.parent_uuid,
         cc.serialno,
-        cc.url
+        cc.url,
+        cc.teacher
         from th_course_chapter cc
         where  cc.del_flag = 0 and cc.course_uuid = #{courseUuid}
         order by serialno
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyAuthMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyAuthMapper.xml
index 9d86f18..3493898 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyAuthMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyAuthMapper.xml
@@ -5,14 +5,14 @@
         select uuid from th_study_auth where study_detail_uuid = #{studyDetaiId}
     </select>
     <insert id="insertBatch">
-        INSERT INTO th_study_auth (id,uuid,approve_photo, auth_position,auth_time, face_type,study_detail_uuid, auth_video) VALUES
+        INSERT INTO th_study_auth (id,uuid,approve_photo, auth_position,auth_time, face_type,study_detail_uuid, auth_video,ip,mac) VALUES
         <foreach collection="list" separator="," item="item">
-            (#{item.id},#{item.uuid},#{item.approvePhoto},#{item.authPosition},#{item.authTime},#{item.faceType},#{item.studyDetailUuid},#{item.authVideo})
+            (#{item.id},#{item.uuid},#{item.approvePhoto},#{item.authPosition},#{item.authTime},#{item.faceType},#{item.studyDetailUuid},#{item.authVideo},#{item.ip},#{item.mac})
         </foreach>
     </insert>
 
     <select id="getByStudyDetaiUuids" resultType="com.gkhy.exam.institutionalaccess.entity.ThStudyAuth" >
-        select id,uuid,approve_photo, auth_position,auth_time, face_type,study_detail_uuid, auth_video from th_study_auth where 1=1 and study_detail_uuid in
+        select id,uuid,approve_photo, auth_position,auth_time, face_type,study_detail_uuid, auth_video,ip,mac from th_study_auth where 1=1 and study_detail_uuid in
         <foreach collection="studyUuids" item="studyUuid" index ="index" open="(" close=")" separator=",">
             #{studyUuid}
         </foreach>
diff --git a/update.sql b/update.sql
index 9f3584e..1dc3ec7 100644
--- a/update.sql
+++ b/update.sql
@@ -1,6 +1,6 @@
 ALTER TABLE `swspkmas`.`th_study_auth`
 ADD COLUMN `ip` varchar(30) NULL,
-ADD COLUMN `max` varchar(40) NULL;
+ADD COLUMN `mac` varchar(40) NULL;
 
 CREATE TABLE `swspkmas`.`tr_cert`  (
 `id` bigint NOT NULL AUTO_INCREMENT,

--
Gitblit v1.9.2