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,51 @@
package request
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
)
// 代理商上分接口
type AgentTransferRequest struct {
AgentId string
Uid string
OrderId string
Diamond string
Signature string
}
// 参数合法性检验
func (request *AgentTransferRequest) CheckParameter() (err error) {
if len(request.AgentId) == 0 {
err = errors.New("AgentId不能为空")
return
}
if len(request.Uid) == 0 {
err = errors.New("Uid不能为空")
return
}
if len(request.OrderId) == 0 {
err = errors.New("OrderId不能为空")
return
}
if len(request.Diamond) == 0 {
err = errors.New("Diamond不能为空")
return
}
if HyTools.StringToInt(request.Diamond) <= 0 {
err = errors.New("Diamond不能为负数")
return
}
if len(request.Signature) == 0 {
err = errors.New("Signature不能为空")
return
}
return
}