瀏覽代碼

增加订单导入功能

abiao 4 年之前
父節點
當前提交
2cd7055889
共有 1 個文件被更改,包括 6 次插入1 次删除
  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