ソースを参照

Merge remote-tracking branch 'origin/dev' into dev

yangdamao 2 年 前
コミット
865bd4577f

+ 4 - 7
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -2393,26 +2393,23 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
     public void liveToReplay(UserQueryBo bo) {
         Long nowTime = DateUtils.getNowTime();
         Long startTime = nowTime - 3600 * 24 * 7;
-        //获取今天直播结束的所有直播节
         List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime, nowTime);
         for (CourseSectionVo sectionVo : list) {
             PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();
             try {
-                queryBo.setChannelId(sectionVo.getLiveUrl()); //频道房间ID
+                queryBo.setChannelId(sectionVo.getLiveUrl());
                 queryBo.setStartTime(startTime);
                 queryBo.setEndTime(nowTime);
                 LiveChannelVideoListResponse.ChannelVedioInfo info = iPolyvLiveService.getListChannelSession(queryBo);
                 if (Validator.isNotEmpty(info)) {
-                    //秒数误差在3个小时以内的判定为节的保利威直播
                     if (Math.abs(sectionVo.getLiveEndTime().longValue() - (info.getEndTime().getTime() / 1000)) < 10800) {
                         if ("complete".equals(info.getRecordFileType())) {
                             CourseSection oldSection = iCourseSectionService.getOne(new LambdaQueryWrapper<CourseSection>()
                                     .eq(CourseSection::getSessionId, info.getChannelSessionId())
                                     .last("limit 1"));
                             if (Validator.isEmpty(oldSection)) {
-                                //录播完成状态且场次ID没被使用
-                                sectionVo.setSessionId(info.getChannelSessionId());//场次ID
-                                sectionVo.setRealDuration(info.getDuration().longValue()); //视频秒数
+                                sectionVo.setSessionId(info.getChannelSessionId());
+                                sectionVo.setRealDuration(info.getDuration().longValue());
                                 sectionVo.setDurationTime(info.getDuration().longValue());
                                 sectionVo.setRealLiveEndTime(info.getEndTime().getTime() / 1000);
                                 sectionVo.setRealLiveStartTime(info.getStartTime().getTime() / 1000);
@@ -2421,7 +2418,7 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
                                 queryBo1.setSessionId(info.getChannelSessionId());
                                 LiveListChannelVideoLibraryResponse.ChannelVideoLibrary channelVideoLibrary = iPolyvLiveService.ListChannelVideoLibrary(queryBo1);
                                 sectionVo.setRecordingUrl(channelVideoLibrary.getVideoPoolId());*/
-                                sectionVo.setSectionType(3); //直播变为回放
+                                sectionVo.setSectionType(3); 
                                 CourseSection section = BeanUtil.toBean(sectionVo, CourseSection.class);
                                 section.setUpdateTime(DateUtils.getNowTime());
                                 iCourseSectionService.updateById(section);