Files
servicebase/pkg/dto/request/CreatePointOrderRequest.go
2025-11-19 14:24:13 +08:00

31 lines
532 B
Go

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
}