Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into develop

topic_bank
杨树明 6 years ago
commit 8e4cfe16ea

@ -1,4 +1,4 @@
# bundle exec rake sync:public_message args=149,2903
# RAILS_ENV=production bundle exec rake sync:sigle_message args=3,-1,8848,48337,'2017-07-23','2017-10-31',1000
namespace :sync do
if ENV['args']
subject_id = ENV['args'].split(",")[0] # 对应课程的id
@ -33,7 +33,7 @@ namespace :sync do
else
shixun_ids = Shixun.find_by_sql("select shixun_id from stage_shixuns where stage_id in (select id from stages where
subject_id=#{subject_id}) ").map(&:shixun_id)
discusses = Discuss.where("parent_id is null").where(dis_id: shixun_ids)
discusses = Discuss.where("parent_id is null and created_at between '#{start_time}' and '#{end_time}'").where(dis_id: shixun_ids)
end
discusses.each do |discuss|

Loading…
Cancel
Save