精品课程rake任务

dev_aliyun_beta
jingquan huang 5 years ago
parent 0275910ea4
commit 0e4c054fd2

@ -22,9 +22,9 @@ namespace :public_classes do
task :student => :environment do
puts "subject_id is #{subject_id}"
puts "course_id is #{course_id}"
pts "start time is #{start_time}"
pts "end time is #{end_time}"
pts "limt is #{limit}"
puts "start time is #{start_time}"
puts "end time is #{end_time}"
puts "limt is #{limit}"
user_ids = Myshixun.find_by_sql("select distinct(user_id) from myshixuns where created_at between '#{start_time}' and '#{end_time}' and shixun_id in (select shixun_id from stage_shixuns
where stage_id in (select id from stages where subject_id=#{subject_id})) limit #{limit}").map(&:user_id)

Loading…
Cancel
Save