Przeglądaj źródła

订单增加赠品提示

abiao 5 lat temu
rodzic
commit
ffd6eefe21

+ 3 - 0
go/gopath/src/fohow.com/apps/controllers/order_controller/order_controller.go

@@ -226,6 +226,7 @@ func (self *OrderController) Detail() {
 		product.SizeName = item.SizeName
 		product.ColorName = item.ColorName
 		product.OrderCount = item.Count
+		product.IsZeng = item.Send
 		o.Count += item.Count
 		if product.SeckilShowPrice > 0 {
 			now := time.Now()
@@ -297,6 +298,8 @@ func (self *OrderController) List() {
 			product.OrderCount = orderItem.Count
 			item.Count += orderItem.Count
 			product.OrderCount = orderItem.Count
+			product.IsZeng = orderItem.Send
+
 			if product.SeckilShowPrice > 0 {
 				now := time.Now()
 				product.SeckillStartAt = product.SeckillStart.Unix()

+ 1 - 0
go/gopath/src/fohow.com/apps/models/product_model/product.go

@@ -98,6 +98,7 @@ type Product struct {
 	SizeId          int64  `orm:"column(size_id)"                          json:"size_id"`                     // varchar(255)
 	ColorId         int64  `orm:"column(color_id)"                          json:"color_id"`                   // varchar(255)
 	HaveSize        bool   `orm:"-"                         json:"have_size"`                                  // bool
+	IsZeng          bool   `orm:"-"                         json:"is_zeng"`                                    // bool
 	SizeName        string `orm:"-"                       json:"size_name"`                                    // varchar(255)
 	ColorName       string `orm:"-"                       json:"color_name"`                                   // varchar(255)
 }