Browse Source

新增累计观看天数和连续观看天数

yfh 6 days ago
parent
commit
28b9cf0364

+ 4 - 0
fs-service-system/src/main/java/com/fs/course/service/impl/FsUserCourseServiceImpl.java

@@ -430,6 +430,10 @@ public class FsUserCourseServiceImpl implements IFsUserCourseService
             // 观看时长
             recordVO.setWatchTime((BigDecimal) sumMap.getOrDefault("watchTime", BigDecimal.ZERO));
 
+            //累计观看天数
+            Long ljDay = fsCourseWatchLogMapper.selectByWatchLjDay(recordVO.getUserId(),recordVO.getProjectId());
+            //连续观看天数
+            Long lxDay = fsCourseWatchLogMapper.selectByWatchlxDay(recordVO.getUserId(),recordVO.getProjectId());
             // 领取状态
             Long count = fsCourseAnswerLogsMapper.selectRedStatus(recordVO.getUserId(), recordVO.getVideoId());
             if (Objects.nonNull(count) && count > 0) {

+ 5 - 0
fs-service-system/src/main/java/com/fs/course/vo/FsUserCourseParticipationRecordVO.java

@@ -18,6 +18,11 @@ public class FsUserCourseParticipationRecordVO {
      * 小节D
      */
     private Long videoId;
+
+    /**
+     * 项目编号
+     */
+    private Long projectId;
     /**
      * 用户昵称
      */

+ 1 - 0
fs-service-system/src/main/resources/mapper/course/FsUserCourseMapper.xml

@@ -257,6 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select
             fu.user_id,
             fucv.video_id,
+        fucv.project_id,
             fu.nickname as nickName,
             fu.username as userName,
             fu.avatar,