|
|
@@ -7,6 +7,8 @@ class CashBalance < ActiveRecord::Base
|
|
|
attr_accessor :remain_sum,:get_happen_total
|
|
|
|
|
|
#after_find :get_happen_total
|
|
|
+ puts params
|
|
|
+ puts params
|
|
|
|
|
|
SOURCE_ENUM = [["提货券充值佣金", "balance_benefit"],
|
|
|
["商品佣金", "product_benefit"],
|
|
|
@@ -45,14 +47,11 @@ class CashBalance < ActiveRecord::Base
|
|
|
@total=0
|
|
|
LIST = []
|
|
|
def get_happen_total
|
|
|
-
|
|
|
unless LIST.include?(self.id)
|
|
|
LIST.append(self.id)
|
|
|
end
|
|
|
# list.append(self.id)
|
|
|
-
|
|
|
total = CashBalance.where(id:LIST).sum("count")
|
|
|
-
|
|
|
return total
|
|
|
end
|
|
|
|