Browse Source

add recharge product to order

abiao 4 years ago
parent
commit
2c7921c22d
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/models/order.rb

+ 2 - 1
app/models/order.rb

@@ -15,7 +15,7 @@ class Order < ActiveRecord::Base
 
 
     before_save :before_save
     before_save :before_save
     #after_update :after_update
     #after_update :after_update
-    after_create :patch_send_product
+    #after_create :patch_send_product
 
 
     scope :所有订单, -> {}
     scope :所有订单, -> {}
     scope :未支付, -> { where("status=?","unpay") }
     scope :未支付, -> { where("status=?","unpay") }
@@ -51,6 +51,7 @@ class Order < ActiveRecord::Base
         redis.del(orderKey)
         redis.del(orderKey)
         test_redis.del(orderKey)
         test_redis.del(orderKey)
 
 
+        patch_send_product
     end
     end
     STATUS_ENUM = [["未支付","unpay"],["已关闭","closed"],["待确认","unconfirmed"],["处理中","processing"],["已完成","complete"],["待收货","dispatch"],["已退款","refunded"]]
     STATUS_ENUM = [["未支付","unpay"],["已关闭","closed"],["待确认","unconfirmed"],["处理中","processing"],["已完成","complete"],["待收货","dispatch"],["已退款","refunded"]]
     TYPE_ENUM = [["普通",0],["秒杀",1],["店长",2],["积分",3],["赠品",4]]
     TYPE_ENUM = [["普通",0],["秒杀",1],["店长",2],["积分",3],["赠品",4]]