|
|
|
@ -57,8 +57,8 @@ namespace :sync do
|
|
|
|
|
discusses = Discuss.where("parent_id is null and dis_id=?", shixun_id)
|
|
|
|
|
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 and dis_id=?", shixun_ids)
|
|
|
|
|
subject_id=#{subject_id}) ").map(&:shixun_id)
|
|
|
|
|
discusses = Discuss.where("parent_id is null").where(dis_id: shixun_ids)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
discusses.each do |discuss|
|
|
|
|
|