Adjustreact
daiao 6 years ago
parent b07bec9346
commit 8d5c1dd962

@ -58,11 +58,11 @@ namespace :subjects do
# end # end
# end # end
# end # end
if str.size > 0 # if str.size > 0
sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str.uniq.join(",")}" # sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str.uniq.join(",")}"
puts sql # puts sql
ActiveRecord::Base.connection.execute sql # ActiveRecord::Base.connection.execute sql
end # end
puts("---------------------data_statistic_end") puts("---------------------data_statistic_end")
Rails.logger.info("---------------------data_statistic_end") Rails.logger.info("---------------------data_statistic_end")
end end

Loading…
Cancel
Save