package request import "errors" type CreatePointOrderRequest struct { BaseRequest BuyAmount string // 下单数量 PriceId string // 价格ID } // 参数合法性检验 func (request *CreatePointOrderRequest) CheckParameter() (err error) { if len(request.AccessToken) == 0 { err = errors.New("AccessToken不能为空") return } if len(request.BuyAmount) == 0 { err = errors.New("BuyAmount不能为空") return } if len(request.PriceId) == 0 { err = errors.New("PriceId不能为空") return } return }