瀏覽代碼

fix zhibo

he2802 3 年之前
父節點
當前提交
819c67bf58

+ 3 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/polyv/service/impl/PolyvLiveServiceImpl.java

@@ -145,14 +145,15 @@ public class PolyvLiveServiceImpl implements IPolyvLiveService {
             Calendar instance = Calendar.getInstance();
             instance.set(2020, 10, 1);
             liveListChannelSessionInfoRequest.setChannelId(bo.getChannelId())
-                    .setStartDate(instance.getTime())
-                    .setEndDate(new Date())
+                    .setStartDate(new Date((bo.getStartTime()*1000)))
+                    .setEndDate(new Date((bo.getEndTime()*1000)))
                     .setCurrentPage(1);
             liveListChannelSessionInfoResponse = new LiveChannelPlaybackServiceImpl().listChannelSessionInfo(
                     liveListChannelSessionInfoRequest);
             if (liveListChannelSessionInfoResponse != null) {
                 if(Validator.isNotEmpty(liveListChannelSessionInfoResponse.getContents())&&liveListChannelSessionInfoResponse.getContents().size()>0){
                     //获取该房间最近一次场次
+                    System.out.println(JSON.toJSONString(liveListChannelSessionInfoResponse));
                     LiveListChannelSessionInfoResponse.ChannelSessionInfo sessionInfo = liveListChannelSessionInfoResponse.getContents().get(0);
                     bo.setSessionId(sessionInfo.getSessionId());
                     return getChannelVideo(bo);

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

@@ -1087,10 +1087,14 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         Long startTime = nowTime - 3600 * 24;
         //获取今天直播结束的所有直播节
         List<CourseSectionVo> list = iCourseSectionService.overSectionList(startTime, nowTime);
+        System.out.println("节列表");
+        System.out.println(list);
         for (CourseSectionVo sectionVo : list) {
             PolyvLiveQueryBo queryBo = new PolyvLiveQueryBo();
             try {
                 queryBo.setChannelId(sectionVo.getLiveUrl()); //频道房间ID
+                queryBo.setStartTime(startTime);
+                queryBo.setEndTime(nowTime);
                 LiveChannelVideoListResponse.ChannelVedioInfo info = iPolyvLiveService.getListChannelSession(queryBo);
                 if (Validator.isNotEmpty(info)) {
                     //秒数误差在1个小时以内的判定为节的保利威直播