24 lines
505 B
Go
24 lines
505 B
Go
package request
|
|
|
|
import "errors"
|
|
|
|
// 获取物品兑换配置表
|
|
type GetGoodsExchangeConfigRequest struct {
|
|
AccessToken string
|
|
GoodsId string
|
|
ActId string
|
|
}
|
|
|
|
// 参数合法性检验
|
|
func (request *GetGoodsExchangeConfigRequest) CheckParameter() (err error) {
|
|
if len(request.AccessToken) == 0 {
|
|
err = errors.New("AccessToken不能为空")
|
|
return
|
|
}
|
|
if len(request.GoodsId) == 0 && len(request.ActId) == 0 {
|
|
err = errors.New("GoodsId和ActId不能同时为空")
|
|
return
|
|
}
|
|
return
|
|
}
|