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,58 @@
package request
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/order"
)
type GetSkillLevelListRequest struct {
AccessToken string
SkillId string
}
// 参数合法性检验
func (request *GetSkillLevelListRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.SkillId) == 0 {
err = errors.New("SkillId不能为空")
return
}
return
}
type GetOrderRankReq struct {
BasePageRequest
Category string // day week month
GuildId string
GroupByFields []string
}
// 参数合法性检验
func (request *GetOrderRankReq) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if request.Category != "week" && request.Category != "day" && request.Category != "month" {
err = errors.New("参数Category错误不支持")
return
}
if len(request.GroupByFields) != 0 {
for _, field := range request.GroupByFields {
_, ok := order.WhitelistFields[field]
if !ok {
err = errors.New("包含不支持的字段")
return
}
}
}
return
}