Browse Source

orderLimt

abiao 1 year ago
parent
commit
c0e8d6b2d7

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

@@ -670,6 +670,8 @@ func (self *PayController) QueryPayInfo() {
 	firstPay := true
 	//店长折扣
 	dis_amount := order.DisAmount
+	//若账户有提货券则优先抵扣提货券
+	totalCoupon := int64(0)
 	list := order_model.GetAllDetailsOrderId(order.OrderId, false)
 	for _, item := range list {
 		//商品状态
@@ -703,9 +705,6 @@ func (self *PayController) QueryPayInfo() {
 			paiedSilver = tp
 		}
 		tp -= paiedSilver
-
-		//若账户有提货券则优先抵扣提货券
-		totalCoupon := int64(0)
 		userLeftBalanceCount := balance_model.GetUserTotalBalance(wxUId)
 		tp += freight
 		total_quan = total_quan + freight
@@ -744,7 +743,7 @@ func (self *PayController) QueryPayInfo() {
 		firstPay = false
 		freight = order.Freight
 		paiedSilver = order.PaiedSilver
-		total_quan = order.CouponPrice
+		totalCoupon = order.CouponPrice
 		total_weixin = order.PaiedPrice
 		paiedCash = order.PaiedCash
 	}
@@ -752,7 +751,7 @@ func (self *PayController) QueryPayInfo() {
 	details.FirstPay = firstPay
 	details.OrderLimit = orderLimt
 	details.Freight = freight
-	details.TotalPrice = total_price
+	details.TotalPrice = totalCoupon
 	details.PayBalance = paiedCash
 	details.PaySilver = paiedSilver
 	details.PayCoupon = total_quan