From 477beb7affe7939c0cd745cc650b207ae78ea86b Mon Sep 17 00:00:00 2001
From: xuliangtong <1124839262@qq.com>
Date: Fri, 2 Dec 2022 15:45:38 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=AE=9E=E6=93=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../com/ibeetl/jlw/service/StudentHandsOnTaskPptService.java   | 2 ++
 .../com/ibeetl/jlw/service/StudentHandsOnTaskVideoService.java | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskPptService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskPptService.java
index 10b699ba..5327bf94 100644
--- a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskPptService.java
+++ b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskPptService.java
@@ -356,12 +356,14 @@ public class StudentHandsOnTaskPptService extends CoreBaseService<StudentHandsOn
             for (TeacherOpenCourseHandsOnSimulationTasksFile file : videoFile) {
                 Map<String, Object> map = new HashMap<>();
                 map.put("fileName", file.getFileName());
+                map.put("taskFileId", file.getTaskFileId());
                 map.put("schedule", 0);
                 map.put("fileUrl", file.getFileUrl());
                 list.add(map);
             }
             studentHandsOnTaskPpt.setPptFile(JSONArray.toJSONString(list));
             studentHandsOnTaskPpt.setPptFiles(list);
+            this.insert(studentHandsOnTaskPpt);
         }else {
             String videoFile = studentHandsOnTaskPpt.getPptFile();
             if (StringUtils.isNotEmpty(videoFile)) {
diff --git a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskVideoService.java b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskVideoService.java
index f156f089..330bbe9c 100644
--- a/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskVideoService.java
+++ b/web/src/main/java/com/ibeetl/jlw/service/StudentHandsOnTaskVideoService.java
@@ -338,6 +338,7 @@ public class StudentHandsOnTaskVideoService extends CoreBaseService<StudentHands
         StudentHandsOnTaskVideo studentHandsOnTaskVideo = this.sqlManager.lambdaQuery(StudentHandsOnTaskVideo.class).andEq(StudentHandsOnTaskVideo::getHandsOnTaskId, taskId)
                 .andEq(StudentHandsOnTaskVideo::getStudentId, student.getStudentId()).singleSimple();
         if (studentHandsOnTaskVideo == null) {
+            studentHandsOnTaskVideo = new StudentHandsOnTaskVideo();
             TeacherOpenCourseHandsOnSimulationTasksFileQuery fileQuery = new TeacherOpenCourseHandsOnSimulationTasksFileQuery();
             fileQuery.setTaskId(taskId);
             //查询视频
@@ -356,12 +357,14 @@ public class StudentHandsOnTaskVideoService extends CoreBaseService<StudentHands
             for (TeacherOpenCourseHandsOnSimulationTasksFile file : videoFile) {
                 Map<String, Object> map = new HashMap<>();
                 map.put("fileName", file.getFileName());
+                map.put("taskFileId", file.getTaskFileId());
                 map.put("schedule", 0);
                 map.put("fileUrl", file.getFileUrl());
                 list.add(map);
             }
             studentHandsOnTaskVideo.setVideoFile(JSONArray.toJSONString(list));
             studentHandsOnTaskVideo.setVideoFiles(list);
+            this.insert(studentHandsOnTaskVideo);
         }else {
             String videoFile = studentHandsOnTaskVideo.getVideoFile();
             if (StringUtils.isNotEmpty(videoFile)) {