abiao 4 lat temu
rodzic
commit
354362677b
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      app/models/cash_balance.rb

+ 2 - 2
app/models/cash_balance.rb

@@ -5,7 +5,7 @@ class CashBalance < ActiveRecord::Base
   belongs_to :wx_user, :foreign_key => :wx_uid
   validates_presence_of :wx_uid, :count, :relate_id, :source
   attr_accessor :remain_sum
-  after_find :get_happen_total
+  #after_find :get_happen_total
 
   SOURCE_ENUM = [["提货券充值佣金", "balance_benefit"],
                  ["商品佣金", "product_benefit"],
@@ -44,7 +44,7 @@ class CashBalance < ActiveRecord::Base
   @total=0
   @list=[]
   def get_happen_total
-    unless @list.include?(3)
+    unless @list.include?(self.id)
       @list.append(self.id)
     end