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

48 lines
739 B
Go

package request
import "errors"
type UpdateUserSignRequest struct {
BaseRequest
Sign string
}
// 参数验证
func (request *UpdateUserSignRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
var arr = []rune(request.Sign)
if len(arr) > 500 {
return errors.New("不能超过500字")
}
return
}
type UpdateUserGenderRequest struct {
BaseRequest
Gender string
}
// 参数验证
func (request *UpdateUserGenderRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.Gender) == 0 {
err = errors.New("性别不能为空")
return
}
return
}