添加视频记录结束字段

PCqiandao
anke1460 5 years ago
parent cde584b027
commit 50abaefa7f

@ -23,7 +23,7 @@ class CreateWatchVideoService < ApplicationService
watch_video_history.end_at = current_time
watch_video_history.total_duration = params[:total_duration]
watch_video_history.watch_duration = params[:watch_duration].to_f > watch_video_history.duration ? watch_video_history.duration : params[:watch_duration]
watch_video_history.is_finished = (watch_video_history.duration <= params[:watch_duration].to_f)
watch_video_history.is_finished = params[:ed].present?
watch_video_history.save!
watch_course_video = watch_video_history.watch_course_video

Loading…
Cancel
Save