feat(app): update
This commit is contained in:
23
pkg/dto/request/GetGoodsExchangeConfigRequest.go
Normal file
23
pkg/dto/request/GetGoodsExchangeConfigRequest.go
Normal file
@ -0,0 +1,23 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user