Browse Source

fix 直播

he2802 3 years ago
parent
commit
bfbf3131b4

+ 5 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.microsoft.schemas.office.visio.x2012.main.SectionType;
 import com.zhongzheng.common.core.redis.RedisCache;
+import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.bank.domain.Exam;
 import com.zhongzheng.modules.course.bo.CourseQueryBo;
@@ -297,7 +298,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
         }else{
             add.setFirstStartTime(add.getStartTime());
         }
-        if(courseSectionVo.getSectionType()==1){
+        if(courseSectionVo.getSectionType()==1||courseSectionVo.getSectionType()==2||courseSectionVo.getSectionType()==3){
             UserStudyRecordQueryBo queryBo = new UserStudyRecordQueryBo();
             queryBo.setUserId(bo.getUserId());
             queryBo.setGradeId(bo.getGradeId());
@@ -546,6 +547,9 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
 
     @Override
     public List<LiveListChannelViewlogResponse.LiveChannelViewlog> userSectionLiveLog(UserStudyRecordQueryBo bo) throws IOException, NoSuchAlgorithmException {
+        if(Validator.isEmpty(bo.getUserId())||Validator.isEmpty(bo.getSectionId())){
+            throw new CustomException("参数错误");
+        }
         UserVo user = iUserService.queryById(bo.getUserId());
         CourseSectionVo sectionVo = iCourseSectionService.queryById(bo.getSectionId());
         PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();