卡密,直充,优化
This commit is contained in:
parent
85034cfb35
commit
b71aa93e65
|
@ -12,6 +12,7 @@ const (
|
||||||
AccountTypeQQ
|
AccountTypeQQ
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// AccountType 账号类型(1:手机号 2:QQ号 其他:0)
|
||||||
func (o AccountType) AccountType(account string) AccountType {
|
func (o AccountType) AccountType(account string) AccountType {
|
||||||
if account == "" {
|
if account == "" {
|
||||||
return AccountTypeDefault
|
return AccountTypeDefault
|
||||||
|
|
|
@ -11,7 +11,7 @@ type Order struct {
|
||||||
MerchantId string `validate:"required" json:"merchantId"`
|
MerchantId string `validate:"required" json:"merchantId"`
|
||||||
OutTradeNo string `validate:"required" json:"outTradeNo"`
|
OutTradeNo string `validate:"required" json:"outTradeNo"`
|
||||||
ProductId string `validate:"required" json:"productId"`
|
ProductId string `validate:"required" json:"productId"`
|
||||||
AccountType AccountType `validate:"required" json:"accountType"` // 账号类型(1:手机号 2:QQ号 其他:0)
|
AccountType AccountType `validate:"required" json:"accountType"`
|
||||||
RechargeAccount string `validate:"required" json:"rechargeAccount"`
|
RechargeAccount string `validate:"required" json:"rechargeAccount"`
|
||||||
NotifyUrl string `validate:"required" json:"notifyUrl"`
|
NotifyUrl string `validate:"required" json:"notifyUrl"`
|
||||||
Version string `validate:"required" json:"version"`
|
Version string `validate:"required" json:"version"`
|
||||||
|
@ -100,11 +100,9 @@ func (o *Notify) Validate() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrderResp) GetCode() Code {
|
func (o *OrderResp) GetCode() Code {
|
||||||
// 不能直接定义值对象,因为单独定义类型type code json.Number类型无法jsonUnmarshal
|
|
||||||
return Code(o.Code)
|
return Code(o.Code)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *QueryResp) GetCode() Code {
|
func (o *QueryResp) GetCode() Code {
|
||||||
// 不能直接定义值对象,因为单独定义类型type code json.Number类型无法jsonUnmarshal
|
|
||||||
return Code(o.Code)
|
return Code(o.Code)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue