From b71aa93e65985a72749db5e86e7d8ac6d260655c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AD=90=E9=93=AD?= Date: Fri, 15 Nov 2024 16:15:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=A1=E5=AF=86=EF=BC=8C=E7=9B=B4=E5=85=85?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dctw/v1/api/direct/account_type.go | 1 + dctw/v1/api/direct/trans.go | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dctw/v1/api/direct/account_type.go b/dctw/v1/api/direct/account_type.go index cf23867..9af9b44 100644 --- a/dctw/v1/api/direct/account_type.go +++ b/dctw/v1/api/direct/account_type.go @@ -12,6 +12,7 @@ const ( AccountTypeQQ ) +// AccountType 账号类型(1:手机号 2:QQ号 其他:0) func (o AccountType) AccountType(account string) AccountType { if account == "" { return AccountTypeDefault diff --git a/dctw/v1/api/direct/trans.go b/dctw/v1/api/direct/trans.go index 2c25152..7aadc1c 100644 --- a/dctw/v1/api/direct/trans.go +++ b/dctw/v1/api/direct/trans.go @@ -11,7 +11,7 @@ type Order struct { MerchantId string `validate:"required" json:"merchantId"` OutTradeNo string `validate:"required" json:"outTradeNo"` 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"` NotifyUrl string `validate:"required" json:"notifyUrl"` Version string `validate:"required" json:"version"` @@ -100,11 +100,9 @@ func (o *Notify) Validate() error { } func (o *OrderResp) GetCode() Code { - // 不能直接定义值对象,因为单独定义类型type code json.Number类型无法jsonUnmarshal return Code(o.Code) } func (o *QueryResp) GetCode() Code { - // 不能直接定义值对象,因为单独定义类型type code json.Number类型无法jsonUnmarshal return Code(o.Code) }