xingzai 1 anno fa
parent
commit
5bdf8f3ce8
2 ha cambiato i file con 12 aggiunte e 8 eliminazioni
  1. 11 8
      controllers/cygx/order.go
  2. 1 0
      models/cygx/orde.go

+ 11 - 8
controllers/cygx/order.go

@@ -165,12 +165,13 @@ func (this *OrderController) OrderList() {
 			item.OrderStatusText = "退款关闭"
 		}
 
-		switch v.PaymentType {
-		case 1:
+		//TradeType        string    `comment:"交易类型,枚举值:JSAPI:公众号支付 、 NATIVE:扫码支付 、 App:App支付 、 MICROPAY:付款码支付 、 MWEB:H5支付 、 FACEPAY:刷脸支付"`
+		switch v.TradeType {
+		case "JSAPI":
 			item.PaymentTypeText = "小程序"
-		case 2:
+		case "NATIVE":
 			item.PaymentTypeText = "PC"
-		case 3:
+		case "MWEB":
 			item.PaymentTypeText = "H5"
 		}
 
@@ -425,14 +426,16 @@ func (this *OrderController) OrderRefundList() {
 			item.OrderStatusText = "退款关闭"
 		}
 
-		switch v.PaymentType {
-		case 1:
+		//TradeType        string    `comment:"交易类型,枚举值:JSAPI:公众号支付 、 NATIVE:扫码支付 、 App:App支付 、 MICROPAY:付款码支付 、 MWEB:H5支付 、 FACEPAY:刷脸支付"`
+		switch v.TradeType {
+		case "JSAPI":
 			item.PaymentTypeText = "小程序"
-		case 2:
+		case "NATIVE":
 			item.PaymentTypeText = "PC"
-		case 3:
+		case "MWEB":
 			item.PaymentTypeText = "H5"
 		}
+
 		item.UserId = v.UserId
 		item.RealName = v.RealName
 		item.Mobile = v.Mobile

+ 1 - 0
models/cygx/orde.go

@@ -44,6 +44,7 @@ type CygxOrderResp struct {
 	OrderCode        string    `comment:"订单编号"`
 	OutTradeCode     string    `comment:"外部交易号"`
 	PaymentType      int       `comment:"支付类型。取值范围:1微信支付,2支付宝支付。"`
+	TradeType        string    `comment:"交易类型,枚举值:JSAPI:公众号支付 、 NATIVE:扫码支付 、 App:App支付 、 MICROPAY:付款码支付 、 MWEB:H5支付 、 FACEPAY:刷脸支付"`
 	GoodsName        string    `comment:"商品名称"`
 	GoodsId          int       `comment:"商品ID"`
 	BuyerInvoice     string    `comment:"买家发票信息"`