diff --git a/app/services/videos/batch_publish_service.rb b/app/services/videos/batch_publish_service.rb index a02732754..e4c2168ee 100644 --- a/app/services/videos/batch_publish_service.rb +++ b/app/services/videos/batch_publish_service.rb @@ -22,7 +22,12 @@ class Videos::BatchPublishService < ApplicationService raise Error, '视频还未上传完成' if video.vod_uploading? video.title = param[:title].to_s.strip.presence || video.title - video.apply_publish + if param[:course_id].present? + video.publish + else + video.apply_publish + end + video.save! video.video_applies.create!