Browse Source

增加商品属性定义

abiao 5 years ago
parent
commit
1fb7563f85
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/models/product.rb

+ 2 - 0
app/models/product.rb

@@ -48,6 +48,7 @@ class Product < ActiveRecord::Base
     end
 
     def gross_interest_rate
+=begin
         @Size = ProductAttrConfig.where("product_id=? and size_type='size'",self.id).first
         if !@Size.blank?
             @productAttrs = ProductAttr.where("attr_key_id=?",@Size.id).order("recommend desc")
@@ -56,6 +57,7 @@ class Product < ActiveRecord::Base
                 SIZE_ENUM.push(a)
             end
         end
+=end
         rate = 0
         if self.buy_price != 0 && self.price != 0
             rate = (( self.price.to_f - self.buy_price.to_f )/self.buy_price.to_f)*100