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,65 @@
package request
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
)
// 聊天室赠送活动礼物的请求
type PresentActivityGiftFromChatRoomRequest struct {
BaseRequest
ChatroomId string
ReceiveUserIds string // 赠送的目标用户ID列表json字符串数组
Count string // 礼物数量
ActId string
ActPrice string
HostUserId string // 主持人ID
IsBatch string // 0=打赏个人 1= 打赏全麦
}
// 注册用户信息签名验证
func (request *PresentActivityGiftFromChatRoomRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.ChatroomId) == 0 {
err = errors.New("ChatroomRoomId不能为空")
return
}
if len(request.ReceiveUserIds) == 0 {
err = errors.New("ReceiveUserIds不能为空")
return
}
if len(request.Count) == 0 {
err = errors.New("Count不能为空")
return
}
if len(request.ActId) == 0 {
err = errors.New("ActId不能为空")
return
}
if len(request.IsBatch) == 0 {
err = errors.New("IsBatch不能为空")
return
}
if request.IsBatch != "0" && request.IsBatch != "1" {
err = errors.New("IsBatch只能是0或1")
return
}
if HyTools.StringToInt(request.ActPrice) <= 0 {
err = errors.New("ActPrice不合法")
return
}
return
}