Browse Source

feat:添加看课视频提示时间

caoliqin 1 week ago
parent
commit
974371ae48

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

@@ -1089,7 +1089,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             }
         }
 
-        Long duration = 0L;
+        long duration = 0L;
         long tipsTime = 0L;
         int isFinish = 0;
         FsUserCourseVideoLinkDetailsVO vo = new FsUserCourseVideoLinkDetailsVO();
@@ -1114,9 +1114,10 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
             duration = Objects.isNull(watchLog) ? 0 : watchLog.getDuration();
         }
 //
-//        if (course.getDuration()!=null){
-//            tipsTime = course.getDuration()/2;
-//        }
+        if (courseVideoDetails != null && courseVideoDetails.getDuration() != null){
+            tipsTime = courseVideoDetails.getDuration()/2;
+        }
+        vo.setTipsTime(tipsTime);
         //判断是否完课
         if (watchLog!=null && watchLog.getLogType() == 2) {
             isFinish = 1;

+ 3 - 0
fs-service-system/src/main/java/com/fs/course/vo/newfs/FsUserCourseVideoLinkDetailsVO.java

@@ -28,4 +28,7 @@ public class FsUserCourseVideoLinkDetailsVO {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private LocalDateTime endDateTime;
     private boolean isRang;
+
+    @ApiModelProperty(value = "视频提示时间")
+    private Long tipsTime;
 }