57 lines
991 B
Go
57 lines
991 B
Go
package request
|
|
|
|
import "errors"
|
|
|
|
type GetUserDetailRequest struct {
|
|
BaseGuildRequest
|
|
GuildId string
|
|
TargetUserId string
|
|
}
|
|
|
|
// 注册用户信息签名验证
|
|
func (request *GetUserDetailRequest) CheckParameter() (err error) {
|
|
|
|
if len(request.AccessToken) == 0 {
|
|
err = errors.New("AccessToken不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.TargetUserId) == 0 {
|
|
err = errors.New("TargetUserId不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.GuildId) == 0 {
|
|
request.GuildId = "-1"
|
|
}
|
|
|
|
return
|
|
}
|
|
|
|
type GetCreateOrderRequest struct {
|
|
BaseRequest
|
|
TargetUserId string
|
|
UserSkillId string
|
|
}
|
|
|
|
// 注册用户信息签名验证
|
|
func (request *GetCreateOrderRequest) CheckParameter() (err error) {
|
|
|
|
if len(request.AccessToken) == 0 {
|
|
err = errors.New("AccessToken不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.TargetUserId) == 0 {
|
|
err = errors.New("TargetUserId不能为空")
|
|
return
|
|
}
|
|
|
|
if len(request.UserSkillId) == 0 {
|
|
err = errors.New("技能ID不能为空")
|
|
return
|
|
}
|
|
|
|
return
|
|
}
|