|
|
@@ -6,7 +6,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def prodcut1
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|
|
|
@@ -15,7 +15,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def prodcut2
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|
|
|
@@ -25,7 +25,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def prodcut3
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|
|
|
@@ -35,7 +35,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def send_prodcut1
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|
|
|
@@ -44,7 +44,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def send_prodcut2
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|
|
|
@@ -54,7 +54,7 @@ class Promotion < ActiveRecord::Base
|
|
|
def send_prodcut3
|
|
|
prd1 = Product.where("id = ?", self.prod1).first
|
|
|
if !prd1.blank?
|
|
|
- return format("%s-%d",prd1.Name,self.nums1)
|
|
|
+ return format("%s-%d",prd1.name,self.nums1)
|
|
|
else
|
|
|
return "不存在"
|
|
|
end
|