Selaa lähdekoodia

更改促销条件

abiao 5 vuotta sitten
vanhempi
commit
b90be3a171
1 muutettua tiedostoa jossa 6 lisäystä ja 6 poistoa
  1. 6 6
      go/gopath/src/fohow.com/apps/helpers/promotion_helper.go

+ 6 - 6
go/gopath/src/fohow.com/apps/helpers/promotion_helper.go

@@ -95,21 +95,21 @@ func SetOrderPromotion(orderId string, wxUid int64) {
 			if item.SendProd1 > 0 && item.SendNums1 > 0 {
 				sendNums1 := nums * item.SendNums1
 				//赠送赠品1
-				product := product_model.GetProductById(item.Prod1, true)
-				go order_model.SendCreate(order.OrderId, order.Id, item.Prod1, product.Price, product.Price, product.Name, sendNums1)
+				product := product_model.GetProductById(item.SendProd1, true)
+				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums1)
 			}
 			if item.SendProd2 > 0 && item.SendNums2 > 0 {
 				sendNums2 := nums * item.SendNums2
 				//赠送赠品1
-				product := product_model.GetProductById(item.Prod2, true)
-				go order_model.SendCreate(order.OrderId, order.Id, item.Prod2, product.Price, product.Price, product.Name, sendNums2)
+				product := product_model.GetProductById(item.SendProd2, true)
+				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums2)
 			}
 
 			if item.SendProd3 > 0 && item.SendNums3 > 0 {
 				sendNums3 := nums * item.SendNums3
 				//赠送赠品1
-				product := product_model.GetProductById(item.Prod1, true)
-				go order_model.SendCreate(order.OrderId, order.Id, item.Prod3, product.Price, product.Price, product.Name, sendNums3)
+				product := product_model.GetProductById(item.SendProd3, true)
+				go order_model.SendCreate(order.OrderId, order.Id, product.Id, product.Price, product.Price, product.Name, sendNums3)
 			}
 		}
 	}