Browse Source

no message

xingzai 10 months ago
parent
commit
e28321de65
1 changed files with 22 additions and 4 deletions
  1. 22 4
      controllers/cygx/order.go

+ 22 - 4
controllers/cygx/order.go

@@ -88,8 +88,17 @@ func (this *OrderController) OrderList() {
 	}
 
 	if paymentType > 0 { // 支付渠道
-		condition += ` 	AND payment_type  = ?  `
-		pars = append(pars, paymentType)
+		var tradeType string
+		switch paymentType {
+		case 1:
+			tradeType = "JSAPI"
+		case 2:
+			tradeType = "NATIVE"
+		case 3:
+			tradeType = "MWEB"
+		}
+		condition += ` 	AND trade_type  = ?  `
+		pars = append(pars, tradeType)
 	}
 
 	if orderStatus > -1 { //订单状态
@@ -356,8 +365,17 @@ func (this *OrderController) OrderRefundList() {
 	}
 
 	if paymentType > 0 { // 支付渠道
-		condition += ` 	AND payment_type  = ?  `
-		pars = append(pars, paymentType)
+		var tradeType string
+		switch paymentType {
+		case 1:
+			tradeType = "JSAPI"
+		case 2:
+			tradeType = "NATIVE"
+		case 3:
+			tradeType = "MWEB"
+		}
+		condition += ` 	AND trade_type  = ?  `
+		pars = append(pars, tradeType)
 	}
 
 	if orderStatus > -1 { //订单状态