Explorar o código

增加订单导入功能

abiao %!s(int64=4) %!d(string=hai) anos
pai
achega
2cd7055889
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      app/models/order_detail.rb

+ 6 - 1
app/models/order_detail.rb

@@ -14,7 +14,12 @@ class OrderDetail < ActiveRecord::Base
     pd = Product.where("id = ?", record[:product_id]).first
     pd = Product.where("id = ?", record[:product_id]).first
   end
-
+  def after_import_save(record)
+    od = Order.where("id = ?", record[:product_id]).first
+    od = Order.where("id = ?",record[:product_id]).first
+    od = Order.where("id = ?", record[:product_id]).first
+    od = Order.where("id = ?", record[:product_id]).first
+  end
   def import_orders
     # 获取商品信息
     pd = Product.where("id = ?", self.product_id).first