소스 검색

直播也创建录播视频

yuhongqi 1 개월 전
부모
커밋
712e69cd5f
1개의 변경된 파일7개의 추가작업 그리고 9개의 파일을 삭제
  1. 7 9
      fs-service-system/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

+ 7 - 9
fs-service-system/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -258,15 +258,13 @@ public class LiveServiceImpl implements ILiveService
         live.setIsAudit(0);
         live.setStatus(1);
         int save = baseMapper.insertLive(live);
-        if (live.getLiveType() == 2) {
-            // 录播 才有视频
-            LiveVideo liveVideo = new LiveVideo();
-            liveVideo.setLiveId(live.getLiveId());
-            liveVideo.setVideoUrl(live.getVideoUrl());
-            liveVideo.setVideoType(1);
-            liveVideo.setDuration(live.getDuration());
-            liveVideoService.insertLiveVideo(liveVideo);
-        }
+        // 录播 才有视频
+        LiveVideo liveVideo = new LiveVideo();
+        liveVideo.setLiveId(live.getLiveId());
+        liveVideo.setVideoUrl(live.getVideoUrl());
+        liveVideo.setVideoType(1);
+        liveVideo.setDuration(live.getDuration());
+        liveVideoService.insertLiveVideo(liveVideo);
         //新增直播数据表
         LiveData liveData = new LiveData();
         liveData.setLiveId(live.getLiveId());