瀏覽代碼

Merge branch 'cygx/mfyx_2.0' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 11 月之前
父節點
當前提交
ef94201463
共有 3 個文件被更改,包括 15 次插入11 次删除
  1. 11 8
      controllers/cygx/order.go
  2. 1 0
      models/cygx/orde.go
  3. 3 3
      models/db.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:"买家发票信息"`

+ 3 - 3
models/db.go

@@ -472,13 +472,13 @@ func initCygx() {
 		new(cygx.CygxActivitySpecialPermissionPoints),
 		new(cygx.CygxUserYanxuanPermission),
 		new(cygx.CygxUserYanxuanPermissionLog),
-		new(cygx.CygxOrderRefund),
-		new(cygx.CygxOrder),
-		new(cygx.CygxOrderAction),
 		new(cygx.CygxEnterScore),
 		new(cygx.CygxEnterScoreGroup),
 		new(cygx.CygxEnterScorePermission),
 		new(cygx.CygxEnterScoreResearcher),
+		new(cygx.CygxOrderRefund),
+		new(cygx.CygxOrder),
+		new(cygx.CygxOrderAction),
 	)
 }