浏览代码

order pay add remark

abiao 4 年之前
父节点
当前提交
b36b9409c2

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

@@ -26,6 +26,8 @@ func (self *PayController) Pay() {
 	oId := self.GetString("order_id")
 	payWay := self.GetString("pay_way")
 	tradPwd := self.GetString("trad_pwd")
+	remark := self.GetString("remark")
+
 	source := self.GetString("s")
 	useCoupon, _ := self.GetBool("use_coupon", true)
 
@@ -52,9 +54,9 @@ func (self *PayController) Pay() {
 		order := order_model.GetOrderById(oId, false)
 
 		if order != nil && order.OrderType != order_model.ORDER_TYPE_CENT {
-			self.payExchange(oId, payWay, tradPwd, returnUrl, source, useCoupon)
+			self.payExchange(oId, payWay, tradPwd, returnUrl, source, remark, useCoupon)
 		} else {
-			self.payCentExchange(oId, returnUrl, source)
+			self.payCentExchange(oId, returnUrl, source, remark)
 		}
 
 	case CASH_TARGET:

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

@@ -32,7 +32,7 @@ var createDrawCode sync.Mutex
 var payOrder sync.Mutex
 
 //支付订单
-func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source string, useCoupon bool) {
+func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source, remark string, useCoupon bool) {
 	payOrder.Lock()
 	defer payOrder.Unlock()
 	var payUrl string
@@ -113,7 +113,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
 			total_price += product.Price * item.Count
 			SaleNumsMap[product.Id] = item.Count
 		}
-
+		order.Remark = remark
 		order.PayWay = payWay
 		order.Contact = address.Contact
 		order.Tel = address.Tel
@@ -267,7 +267,7 @@ func (self *PayController) payExchange(oId, payWay, tradPwd, returnUrl, source s
 }
 
 //支付积分订单
-func (self *PayController) payCentExchange(oId, returnUrl, source string) {
+func (self *PayController) payCentExchange(oId, returnUrl, source, remark string) {
 	payOrder.Lock()
 	defer payOrder.Unlock()
 	var payUrl string
@@ -296,7 +296,6 @@ func (self *PayController) payCentExchange(oId, returnUrl, source string) {
 		self.ReturnError(403, apps.NotUnPay, "", nil)
 	}
 	SaleNumsMap := make(map[int64]int64)
-
 	//获取购物商品明细
 	buy_price_total := int64(0)
 	total_price := int64(0)
@@ -332,7 +331,7 @@ func (self *PayController) payCentExchange(oId, returnUrl, source string) {
 		total_price += product.Price * item.Count
 		SaleNumsMap[product.Id] = item.Count
 	}
-
+	order.Remark = remark
 	order.PayWay = order_model.PAY_WAY_CENT
 	order.Contact = address.Contact
 	order.Tel = address.Tel