Kaynağa Gözat

添加 看课休息暂停配置开关

xgb 3 gün önce
ebeveyn
işleme
3f5d849d2b

+ 5 - 0
fs-service/src/main/java/com/fs/course/config/CourseConfig.java

@@ -42,6 +42,8 @@ public class CourseConfig implements Serializable {
     private Integer delayEnd;
     private Integer isNegative;//是否为负数 0、不允许,1、允许
 
+    private Integer isOpen;
+
     /**
      * 侧边栏是否仅展示当天课程
      */
@@ -92,6 +94,9 @@ public class CourseConfig implements Serializable {
      */
     private String isRedPackageBalanceDeduction;
 
+    // 控制休息提示是否打开 默认打开 0-关闭 1-打开
+    private Integer isOpenRestReminder;
+
 
     @Data
     public static class DisabledTimeVo{

+ 11 - 7
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -2401,15 +2401,19 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
         } else {
             duration = Objects.isNull(watchLog) ? 0 : watchLog.getDuration();
         }
-//
-        if (courseVideoDetails != null && courseVideoDetails.getDuration() != null){
-            // 查询视频是否设置了红包,没有就不提示
-            Integer fsUserCourseVideoRedPackage = fsUserCourseVideoRedPackageMapper.selectRedPacketByCompanyCount(param.getVideoId(), null, param.getPeriodId());
-            if(fsUserCourseVideoRedPackage>0){
-                tipsTime = courseVideoDetails.getDuration() / 3;
-                tipsTime2 = (courseVideoDetails.getDuration() * 2) / 3;
+
+        // 2025-11-16 鹤颜堂 xgb 添加配置控制休息提示是否打开要暂停 默认打开 0-关闭 1-打开
+        if(config.getIsOpenRestReminder()==null || config.getIsOpenRestReminder()==1 ){
+            if (courseVideoDetails != null && courseVideoDetails.getDuration() != null){
+                // 查询视频是否设置了红包,没有就不提示
+                Integer fsUserCourseVideoRedPackage = fsUserCourseVideoRedPackageMapper.selectRedPacketByCompanyCount(param.getVideoId(), null, param.getPeriodId());
+                if(fsUserCourseVideoRedPackage>0){
+                    tipsTime = courseVideoDetails.getDuration() / 3;
+                    tipsTime2 = (courseVideoDetails.getDuration() * 2) / 3;
+                }
             }
         }
+
         vo.setTipsTime(tipsTime);
         vo.setTipsTime2(tipsTime2);
         //判断是否完课