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,39 @@
package inner
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
)
type AttackBossRequest struct {
AccessToken string
RoomId string
BossId string
AttackCount string
}
// 参数合法性检验
func (request *AttackBossRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("UserId不能为空")
return
}
if len(request.BossId) == 0 {
err = errors.New("BossId不能为空")
return
}
if len(request.AttackCount) == 0 {
err = errors.New("AttackCount不能为空")
return
}
if HyTools.StringToInt(request.AttackCount) < 1 || HyTools.StringToInt(request.AttackCount) > 100000 {
err = errors.New("AttackCount不合法")
return
}
return
}