From eddb4440721173e763db02bdd227ef1ed34d0acb Mon Sep 17 00:00:00 2001 From: anke1460 Date: Thu, 12 Mar 2020 11:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E8=A7=86=E9=A2=91=E6=97=B6?= =?UTF-8?q?=E9=95=BFid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/create_watch_video_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/create_watch_video_service.rb b/app/services/create_watch_video_service.rb index 8e4297aee..c7b3bb3bb 100644 --- a/app/services/create_watch_video_service.rb +++ b/app/services/create_watch_video_service.rb @@ -40,7 +40,7 @@ class CreateWatchVideoService < ApplicationService # 开始播放时记录一次 if params[:course_id].present? # 课堂视频 - course_video = CourseVideo.find_by(course_id: params[:course_id], video_id: params[:video_id]) + course_video = CourseVideo.find_by(params[:course_video_id]) watch_course_video = WatchCourseVideo.find_or_initialize_by(course_video_id: course_video.id, user_id: user.id) do |d| d.start_at = current_time d.duration = params[:duration]