Просмотр исходного кода

Merge branch 'develop' into feature/app_dev

* develop:
  增加商品赠券显示
abiao лет назад: 4
Родитель
Сommit
b85bf1b819

+ 1 - 0
go/gopath/src/fohow.com/apps/controllers/promotion_controller/promotion_controller.go

@@ -25,6 +25,7 @@ func (self *PromotionController) GetList() {
 		product := product_model.GetProductById(v.SendProd, false)
 		if product != nil {
 			v.ProductName = product.Name
+			v.ProductImage = self.GetCdnFullImgUrl(product.Cover)
 		}
 	}
 

+ 15 - 14
go/gopath/src/fohow.com/apps/models/promotion_model/present.go

@@ -22,20 +22,21 @@ var SOURCE_CN = map[string]string{
 }
 
 type Present struct {
-	Id          int64     `orm:"column(id);pk"                                       json:"id"`             // int(11)
-	WxUId       int64     `orm:"column(wx_user_id)"                                  json:"wx_user_id"`     // int(11)
-	Price       int64     `orm:"column(price)"                                        json:"price"`         // int(11)
-	Total       int64     `orm:"column(total)"                                        json:"total"`         // int(11)
-	SendProd    int64     `orm:"column(send_prod1)"                                  json:"send_prod1"`     // int(11)
-	SendNums    int64     `orm:"column(send_nums1)"                                  json:"send_nums1"`     // int(11)
-	OrderId     string    `orm:"column(order_id);null"                                     json:"order_id"` // varchar(32)
-	Source      string    `orm:"column(source);null"                                     json:"source"`     // varchar(32)
-	Remark      string    `orm:"column(remark);null"                                     json:"remark"`     // varchar(32)
-	Status      bool      `orm:"column(status)"                         json:"-"`                           // int(11)
-	SourceName  string    `orm:"-"                                                   json:"source_name"`    // varchar(255)
-	ProductName string    `orm:"-"                                                   json:"product_name"`   // varchar(255)
-	CreatedAt   time.Time `orm:"column(created_at);null;auto_now_add;type(datetime)" json:"created_at"`     // datetime
-	UpdatedAt   time.Time `orm:"column(updated_at);null;auto_now;type(datetime)"     json:"updated_at"`     // datetime
+	Id           int64     `orm:"column(id);pk"                                       json:"id"`             // int(11)
+	WxUId        int64     `orm:"column(wx_user_id)"                                  json:"wx_user_id"`     // int(11)
+	Price        int64     `orm:"column(price)"                                        json:"price"`         // int(11)
+	Total        int64     `orm:"column(total)"                                        json:"total"`         // int(11)
+	SendProd     int64     `orm:"column(send_prod1)"                                  json:"send_prod1"`     // int(11)
+	SendNums     int64     `orm:"column(send_nums1)"                                  json:"send_nums1"`     // int(11)
+	OrderId      string    `orm:"column(order_id);null"                                     json:"order_id"` // varchar(32)
+	Source       string    `orm:"column(source);null"                                     json:"source"`     // varchar(32)
+	Remark       string    `orm:"column(remark);null"                                     json:"remark"`     // varchar(32)
+	Status       bool      `orm:"column(status)"                         json:"-"`                           // int(11)
+	SourceName   string    `orm:"-"                                                   json:"source_name"`    // varchar(255)
+	ProductName  string    `orm:"-"                                                   json:"product_name"`   // varchar(255)
+	ProductImage string    `orm:"-"                                                   json:"product_image"`  // varchar(255)
+	CreatedAt    time.Time `orm:"column(created_at);null;auto_now_add;type(datetime)" json:"created_at"`     // datetime
+	UpdatedAt    time.Time `orm:"column(updated_at);null;auto_now;type(datetime)"     json:"updated_at"`     // datetime
 }
 
 func (self *Present) TableName() string {