添加文件: xy-shanghai/types.go
This commit is contained in:
parent
53228d8f2b
commit
f15e10af68
|
|
@ -0,0 +1,81 @@
|
||||||
|
package xyshanghai
|
||||||
|
|
||||||
|
// EncryptedRequest 加密请求体。
|
||||||
|
type EncryptedRequest struct {
|
||||||
|
EncryptedData string `json:"encryptedData"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CommonResponse 公共响应结构体。
|
||||||
|
type CommonResponse struct {
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
Data string `json:"data"` // 加密的 JSON 字符串,解密后使用
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateOrderRequest 卡券/直充权益下单接口的业务数据。
|
||||||
|
type CreateOrderRequest struct {
|
||||||
|
ActCode string `json:"actCode"`
|
||||||
|
GoodsCode string `json:"goodsCode"`
|
||||||
|
ActOrderNum string `json:"actOrderNum"`
|
||||||
|
Account string `json:"account,omitempty"`
|
||||||
|
CallbackURL string `json:"callbackUrl,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateOrderResponseData 下单接口响应解密后的 data 字段。
|
||||||
|
type CreateOrderResponseData struct {
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
CouponNo string `json:"couponNo,omitempty"`
|
||||||
|
CouponCode string `json:"couponCode,omitempty"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
ExpireTime string `json:"expireTime,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderRequest 订单查询接口的业务数据。
|
||||||
|
type QueryOrderRequest struct {
|
||||||
|
ActCode string `json:"actCode"`
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryOrderResponseData 订单查询接口响应解密后的 data 字段。
|
||||||
|
type QueryOrderResponseData struct {
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
Account string `json:"account,omitempty"`
|
||||||
|
CardInfo *CardInfo `json:"cardInfo,omitempty"`
|
||||||
|
CouponID string `json:"couponId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CardInfo 卡券信息。
|
||||||
|
type CardInfo struct {
|
||||||
|
CouponNo string `json:"couponNo"`
|
||||||
|
CouponCode string `json:"couponCode"`
|
||||||
|
ExpireTime string `json:"expireTime"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// RechargeOrderRequest 微信立减金充值接口的业务数据。
|
||||||
|
type RechargeOrderRequest struct {
|
||||||
|
ActCode string `json:"actCode"`
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
GoodsCode string `json:"goodsCode"`
|
||||||
|
ActOrderNum string `json:"actOrderNum"`
|
||||||
|
AppID string `json:"appId"`
|
||||||
|
OpenID string `json:"openId"`
|
||||||
|
CallbackURL string `json:"callbackUrl,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// RechargeOrderResponseData 充值接口响应解密后的 data 字段。
|
||||||
|
type RechargeOrderResponseData struct {
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
CouponID string `json:"couponId,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// CallbackBizData 回调通知的业务数据(加密前)。
|
||||||
|
type CallbackBizData struct {
|
||||||
|
OrderNo string `json:"orderNo"`
|
||||||
|
ActOrderNum string `json:"actOrderNum"`
|
||||||
|
Status int `json:"status"`
|
||||||
|
Account string `json:"account,omitempty"`
|
||||||
|
CardInfo *CardInfo `json:"cardInfo,omitempty"`
|
||||||
|
CouponID string `json:"couponId,omitempty"`
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue