From 86a0ee8f56e378cfc880c436b43c1f9095995c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Sat, 8 Oct 2022 20:50:26 +0800 Subject: [PATCH] - update type --- api.buy.go | 2 +- api.buy.notify.gin.go | 2 +- api.order.go | 12 ++++++------ api.outer-order.go | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/api.buy.go b/api.buy.go index edf718a..680c9c9 100644 --- a/api.buy.go +++ b/api.buy.go @@ -10,7 +10,7 @@ type ApiBuyResponse struct { Code string `json:"code"` Message string `json:"message"` Data struct { - OrderID int64 `json:"order_id"` // 订单号 + OrderId string `json:"order_id"` // 订单号 ProductPrice string `json:"product_price"` // 商品价格 TotalPrice string `json:"total_price"` // 总支付价格 RechargeUrl string `json:"recharge_url"` // 卡密充值网址 diff --git a/api.buy.notify.gin.go b/api.buy.notify.gin.go index 194f456..c0b525f 100644 --- a/api.buy.notify.gin.go +++ b/api.buy.notify.gin.go @@ -7,7 +7,7 @@ import ( // ResponseApiBuyNotifyGin 购买商品 - 回调通知 - 请求参数 type ResponseApiBuyNotifyGin struct { - OrderId int64 `form:"order_id" json:"order_id" xml:"order_id" uri:"order_id" binding:"required"` // 订单编号 + OrderId string `form:"order_id" json:"order_id" xml:"order_id" uri:"order_id" binding:"required"` // 订单编号 OuterOrderId string `form:"outer_order_id" json:"outer_order_id" xml:"outer_order_id" uri:"outer_order_id" binding:"omitempty"` // 商户订单号 ProductId int `form:"product_id" json:"product_id" xml:"product_id" uri:"product_id" binding:"omitempty"` // 商品编号 Quantity int `form:"quantity" json:"quantity" xml:"quantity" uri:"quantity" binding:"required"` // 购买数量 diff --git a/api.order.go b/api.order.go index c2b3269..8d34331 100644 --- a/api.order.go +++ b/api.order.go @@ -10,17 +10,17 @@ type ApiOrderResponse struct { Code string `json:"code"` Message string `json:"message"` Data struct { - ID int64 `json:"id"` // 订单号 - ProductID int `json:"product_id"` // 商品编号 + Id string `json:"id"` // 订单号 + ProductId int `json:"product_id"` // 商品编号 ProductName string `json:"product_name"` // 商品名称 ProductType int `json:"product_type"` // 商品类型(1:充值,2:卡密,3:卡券,4:人工) ProductPrice string `json:"product_price"` // 售价 Quantity int `json:"quantity"` // 购买数量 TotalPrice string `json:"total_price"` // 总支付价格 RefundedAmount float64 `json:"refunded_amount"` // 已退款金额 - BuyerCustomerID int `json:"buyer_customer_id"` // 买家编号 + BuyerCustomerId int `json:"buyer_customer_id"` // 买家编号 BuyerCustomerName string `json:"buyer_customer_name"` // 买家名称 - SellerCustomerID int `json:"seller_customer_id"` // 卖家编号 + SellerCustomerId int `json:"seller_customer_id"` // 卖家编号 SellerCustomerName string `json:"seller_customer_name"` // 卖家名称 State int `json:"state"` // 订单状态(100:等待发货,101:正在充值,200:交易成功,500:交易失败,501:未知状态) CreatedAt string `json:"created_at"` // 下单时间 @@ -34,8 +34,8 @@ type ApiOrderResponse struct { No string `json:"no"` Password string `json:"password"` } `json:"cards"` //【卡密类订单】卡密 - RechargeParams string `json:"recharge_params"` //【充值类订单】 - OuterApiOrderID string `json:"outer_ApiOrder_id,omitempty"` // 外部订单号 + RechargeParams string `json:"recharge_params"` //【充值类订单】 + OuterOrderId string `json:"outer_order_id,omitempty"` // 外部订单号 } `json:"data"` } diff --git a/api.outer-order.go b/api.outer-order.go index 0236b9f..1a4b53b 100644 --- a/api.outer-order.go +++ b/api.outer-order.go @@ -10,17 +10,17 @@ type ApiOuterOrderResponse struct { Code string `json:"code"` Message string `json:"message"` Data struct { - ID int64 `json:"id"` // 订单号 - ProductID int `json:"product_id"` // 商品编号 + Id string `json:"id"` // 订单号 + ProductId int `json:"product_id"` // 商品编号 ProductName string `json:"product_name"` // 商品名称 ProductType int `json:"product_type"` // 商品类型(1:充值,2:卡密,3:卡券,4:人工) ProductPrice string `json:"product_price"` // 售价 Quantity int `json:"quantity"` // 购买数量 TotalPrice string `json:"total_price"` // 总支付价格 RefundedAmount float64 `json:"refunded_amount"` // 已退款金额 - BuyerCustomerID int `json:"buyer_customer_id"` // 买家编号 + BuyerCustomerId int `json:"buyer_customer_id"` // 买家编号 BuyerCustomerName string `json:"buyer_customer_name"` // 买家名称 - SellerCustomerID int `json:"seller_customer_id"` // 卖家编号 + SellerCustomerId int `json:"seller_customer_id"` // 卖家编号 SellerCustomerName string `json:"seller_customer_name"` // 卖家名称 State int `json:"state"` // 订单状态(100:等待发货,101:正在充值,200:交易成功,500:交易失败,501:未知状态) CreatedAt string `json:"created_at"` // 下单时间 @@ -35,7 +35,7 @@ type ApiOuterOrderResponse struct { Password string `json:"password"` } `json:"cards"` //【卡密类订单】卡密 RechargeParams string `json:"recharge_params"` //【充值类订单】 - OuterOrderID string `json:"outer_order_id,omitempty"` // 外部订单号 + OuterOrderId string `json:"outer_order_id,omitempty"` // 外部订单号 } `json:"data"` }