Browse Source

no message

xingzai 10 months ago
parent
commit
fc5f6c092f
3 changed files with 3 additions and 0 deletions
  1. 1 0
      models/order/order.go
  2. 1 0
      models/order/order_user_card.go
  3. 1 0
      services/order.go

+ 1 - 0
models/order/order.go

@@ -38,6 +38,7 @@ type CygxOrder 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:"买家发票信息"`

+ 1 - 0
models/order/order_user_card.go

@@ -87,6 +87,7 @@ func AddCygxOrderUserCard(item *CygxOrderUserCard, itemOrder *CygxOrder) (err er
 	updateParams["StartDate"] = item.StartDate
 	updateParams["EndDate"] = item.EndDate
 	updateParams["PaymentType"] = 1
+	updateParams["TradeType"] = itemOrder.TradeType
 	ptrStructOrTableName := "cygx_order"
 	whereParam := map[string]interface{}{"order_code": itemOrder.OrderCode}
 	qs := o.QueryTable(ptrStructOrTableName)

+ 1 - 0
services/order.go

@@ -169,6 +169,7 @@ func HandleOrderHandle(itemCallback *WechatPayCallback) {
 	itemOrder.PayMoney = float64(float64(itemCallback.Amount.PayerTotal) / 100) // 金额分转换处理
 	itemOrder.OrderStatus = 2
 	itemOrder.OutTradeCode = itemCallback.TransactionID
+	itemOrder.TradeType = itemCallback.TradeType
 
 	//文章处理逻辑  	OrderType        int       `comment:"订单类型,1:畅读卡订单,2:单场付费订单"`
 	if orderDetail.OrderType == 1 {