From ea08221c2ec2430a0924a24bad32976ed6306a47 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Sat, 8 Feb 2020 00:12:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=BF=99=E8=BE=B9=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E8=A7=86=E9=A2=91=E7=9B=B4=E6=8E=A5=E5=8F=91?= =?UTF-8?q?=E5=B8=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/videos/batch_publish_service.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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!