Przeglądaj źródła

feat: 添加看视频过程提示时间

caoliqin 4 dni temu
rodzic
commit
0bf916a3d6

+ 4 - 1
fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -1097,6 +1097,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
 
         long duration = 0L;
         long tipsTime = 0L;
+        long tipsTime2 = 0L;
         int isFinish = 0;
         FsUserCourseVideoLinkDetailsVO vo = new FsUserCourseVideoLinkDetailsVO();
         vo.setCourseVideoDetails(courseVideoDetails);
@@ -1121,9 +1122,11 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         }
 //
         if (courseVideoDetails != null && courseVideoDetails.getDuration() != null){
-            tipsTime = courseVideoDetails.getDuration()/2;
+            tipsTime = courseVideoDetails.getDuration() / 3;
+            tipsTime2 = (courseVideoDetails.getDuration() * 2) / 3;
         }
         vo.setTipsTime(tipsTime);
+        vo.setTipsTime2(tipsTime2);
         //判断是否完课
         if (watchLog!=null && watchLog.getLogType() == 2) {
             isFinish = 1;

+ 5 - 1
fs-service-system/src/main/java/com/fs/course/vo/newfs/FsUserCourseVideoLinkDetailsVO.java

@@ -29,6 +29,10 @@ public class FsUserCourseVideoLinkDetailsVO {
     private LocalDateTime endDateTime;
     private boolean isRang;
 
-    @ApiModelProperty(value = "视频提示时间")
+    @ApiModelProperty(value = "视频提示时间-第一阶段")
     private Long tipsTime;
+
+    @ApiModelProperty(value = "视频提示时间-第二阶段")
+    private Long tipsTime2;
+
 }