Bläddra i källkod

订单增加赠品提示

abiao 5 år sedan
förälder
incheckning
8adc8d154d

+ 5 - 5
go/gopath/src/fohow.com/apps/controllers/pay_controller/pay_exchange_controller.go

@@ -151,13 +151,13 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
 			} else {
 				productId = order_model.SEND_PRODUCT_ID
 			}
-			saleList := order_model.GetWxUserOrders(wxUser.Id)
+			//saleList := order_model.GetWxUserOrders(wxUser.Id)
 			//beego.BeeLogger.Error("en(saleList)=%d", len(saleList))
 			//	七月注册会员首单赠送赠品
-			if order.TotalPrice >= order_model.PROMOTION_TOTAL && len(saleList) == 1 {
-				product := product_model.GetProductById(productId, false)
-				go order_model.SendCreate(order.OrderId, order.Id, productId, product.Price, product.Price, product.Name, int64(1))
-			}
+			//if order.TotalPrice >= order_model.PROMOTION_TOTAL && len(saleList) == 1 {
+			product := product_model.GetProductById(productId, false)
+			go order_model.SendCreate(order.OrderId, order.Id, productId, product.Price, product.Price, product.Name, int64(1))
+			//}
 			//已支付订单移除未支付队列
 			cancelKey := helpers.GetOrderCancelList()
 			helpers.ThrowOutRedisList(cancelKey, order.OrderId)