卡密,直充,优化

This commit is contained in:
李子铭 2024-11-15 16:15:54 +08:00
parent 85034cfb35
commit b71aa93e65
2 changed files with 2 additions and 3 deletions

View File

@ -12,6 +12,7 @@ const (
AccountTypeQQ
)
// AccountType 账号类型(1:手机号 2:QQ号 其他0)
func (o AccountType) AccountType(account string) AccountType {
if account == "" {
return AccountTypeDefault

View File

@ -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)
}