feat(app): update

This commit is contained in:
Yangtao
2025-11-19 14:24:13 +08:00
parent 1eac66d7fd
commit 0c34585649
329 changed files with 10760 additions and 281 deletions

View File

@ -0,0 +1,91 @@
package request
import "errors"
// 代理用户登录
type AgentUserLoginRequest struct {
AgentId string `json:"agentId"`
Uid string `json:"uid"`
UserName string `json:"userName"`
Gender string `json:"gender"`
Mobile string `json:"mobile"`
Signature string `json:"signature"`
}
// 参数合法性检验
func (request *AgentUserLoginRequest) CheckParameter() (err error) {
// 代理用户的ID
if len(request.AgentId) == 0 {
err = errors.New("agentId不能为空")
return
}
if len(request.Uid) == 0 {
err = errors.New("uid不能为空")
return
}
if len(request.UserName) == 0 {
err = errors.New("userName不能为空")
return
}
if len(request.Gender) == 0 {
err = errors.New("gender不能为空")
return
}
if len(request.Signature) == 0 {
err = errors.New("signature不能为空")
return
}
return
}
// 内部用户登录
type InnerUserLoginRequest struct {
Mobile string `json:"mobile"`
Signature string `json:"signature"`
}
// 参数合法性检验
func (request *InnerUserLoginRequest) CheckParameter() (err error) {
// 代理用户的ID
if len(request.Mobile) == 0 {
err = errors.New("agentId不能为空")
return
}
if len(request.Signature) == 0 {
err = errors.New("signature不能为空")
return
}
return
}
// 代理获取推广房间
type AgentPromoteRoomRequest struct {
AgentId string `json:"agentId"`
AccessToken string `json:"accessToken"`
Signature string `json:"signature"`
}
// 参数合法性检验
func (request *AgentPromoteRoomRequest) CheckParameter() (err error) {
// 代理用户的ID
if len(request.AgentId) == 0 {
err = errors.New("未登录不能为空")
return
}
if len(request.AccessToken) == 0 {
err = errors.New("token不能为空")
return
}
if len(request.Signature) == 0 {
err = errors.New("signature不能为空")
return
}
return
}