package request import "errors" // 申请技能请求 type SkillEditRequest struct { BaseRequest UserSkillId string SkillCertImg string SkillAudioUrl string AudioTime string SkillLevel string GameRole string BriefDesc string } // 签名验证 func (request *SkillEditRequest) CheckParameter() (err error) { if len(request.AccessToken) == 0 { err = errors.New("AccessToken不能为空") return } if len(request.UserSkillId) == 0 { err = errors.New("SkillId不能为空") return } if len(request.SkillCertImg) == 0 { err = errors.New("SkillCertImg不能为空") return } return } // 申请技能请求 type SkillEditCommentRequest struct { BaseRequest UserSkillId string BriefDesc string } func (request *SkillEditCommentRequest) CheckParameter() (err error) { if len(request.AccessToken) == 0 { err = errors.New("AccessToken不能为空") return } if len(request.UserSkillId) == 0 { err = errors.New("SkillId不能为空") return } return } // 技能价格修改请求 type SkillPriceEditRequest struct { BaseRequest UserSkillId string PriceId string NewPrice string } // 签名验证 func (request *SkillPriceEditRequest) CheckParameter() (err error) { if len(request.AccessToken) == 0 { err = errors.New("AccessToken不能为空") return } if len(request.UserSkillId) == 0 { err = errors.New("SkillId不能为空") return } if len(request.PriceId) == 0 { err = errors.New("价格ID不能为空") return } if len(request.NewPrice) == 0 { err = errors.New("价格ID不能为空") return } return }