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,17 @@
package inner
import "errors"
type AppealOrderRequest struct {
OrderId string
}
// 参数合法性检验
func (request *AppealOrderRequest) CheckParameter() (err error) {
if len(request.OrderId) == 0 {
err = errors.New("Mobile不能为空")
return
}
return
}

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
}

View File

@ -0,0 +1,34 @@
package inner
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
)
type BuyLuckBoxKeysRequest struct {
AccessToken string
BuyCount string
}
// 参数合法性检验
func (request *BuyLuckBoxKeysRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.BuyCount) == 0 {
err = errors.New("BuyCount不能为空")
return
}
intCount := HyTools.StringToInt64(request.BuyCount)
if intCount < 1 || intCount > 10000 {
err = errors.New("购买数量不合法最大10000个")
return
}
return
}

View File

@ -0,0 +1,26 @@
package inner
import (
"errors"
)
type GetActivityBossRequest struct {
AccessToken string
ActivityId string
RoomId string
}
// 参数合法性检验
func (request *GetActivityBossRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.ActivityId) == 0 {
err = errors.New("ActivityId不能为空")
return
}
return
}

View File

@ -0,0 +1,25 @@
package inner
import (
"errors"
)
type GetOpenBoxRankRequest struct {
AccessToken string
RankType string //TODAY=今日榜 YESTODAY = 昨天
}
// 参数合法性检验
func (request *GetOpenBoxRankRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.RankType) == 0 {
err = errors.New("RankType不能为空")
return
}
return
}

View File

@ -0,0 +1,18 @@
package inner
import "errors"
type GetRoomWeeklyTopListRequest struct {
Week string
}
// 参数合法性检验
func (request *GetRoomWeeklyTopListRequest) CheckParameter() (err error) {
if len(request.Week) == 0 {
err = errors.New("Week不能为空")
return
}
return
}

View File

@ -0,0 +1,25 @@
package inner
import "errors"
// 领取击杀奖品
type GetSkillPrizeRequest struct {
AccessToken string
BossId string
}
// 参数合法性检验
func (request *GetSkillPrizeRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.BossId) == 0 {
err = errors.New("BossId不能为空")
return
}
return
}

View File

@ -0,0 +1,81 @@
package inner
import "errors"
// 获取用户的活动打怪排行
type GetUserActivityAttackRankRequest struct {
AccessToken string
ActivityIdList string
}
// 参数合法性检验
func (request *GetUserActivityAttackRankRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
return
}
// 获取BOSS信息
type GetBossInfoRequest struct {
AccessToken string
BossId string
PageNo string
PageSize string
}
// 参数合法性检验
func (request *GetBossInfoRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("用户Id不能为空")
return
}
if len(request.BossId) == 0 {
err = errors.New("BossId不能为空")
return
}
return
}
// 获取领奖中心列表
type GetDeathPrizeListRequest struct {
AccessToken string
Page int
Size int
}
// 参数合法性检验
func (request *GetDeathPrizeListRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("用户Id不能为空")
return
}
if request.Page < 0 {
request.Page = 0
}
if request.Size < 1 {
request.Size = 10
}
return
}
// 获取领奖中心列表
type GetDeathPrizeRequest struct {
AccessToken string
BossId string
RoomId string
}
// 参数合法性检验
func (request *GetDeathPrizeRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("用户Id不能为空")
return
}
if len(request.BossId) == 0 {
err = errors.New("BossId不能为空")
return
}
return
}

View File

@ -0,0 +1,43 @@
package inner
import "errors"
type GetUserInfoByMobileOrUserNoRequest struct {
Mobile string
}
// 参数合法性检验
func (request *GetUserInfoByMobileOrUserNoRequest) CheckParameter() (err error) {
if len(request.Mobile) == 0 {
err = errors.New("Mobile不能为空")
return
}
return
}
type GetUserInfoRequest struct {
UserId string
IdType string //1=用户ID 2=用户No
}
// 参数合法性检验
func (request *GetUserInfoRequest) CheckParameter() (err error) {
if len(request.UserId) == 0 {
err = errors.New("UserId不能为空")
return
}
if len(request.IdType) == 0 {
err = errors.New("IdType不能为空")
return
}
if request.IdType != "1" && request.IdType != "2" {
err = errors.New("IdType非法")
return
}
return
}

View File

@ -0,0 +1,18 @@
package inner
import "errors"
type GetVipConfigRequest struct {
VipLevel string
}
// 参数合法性检验
func (request *GetVipConfigRequest) CheckParameter() (err error) {
if len(request.VipLevel) == 0 {
err = errors.New("VipLevel不能为空")
return
}
return
}

View File

@ -0,0 +1,30 @@
package inner
import "errors"
type ManualRechargeRequest struct {
RechargeId string
PayTradeNo string
PayTime string
}
// 参数合法性检验
func (request *ManualRechargeRequest) CheckParameter() (err error) {
if len(request.RechargeId) == 0 {
err = errors.New("RechargeId不能为空")
return
}
if len(request.PayTradeNo) == 0 {
err = errors.New("PayTradeNo不能为空")
return
}
if len(request.PayTime) == 0 {
err = errors.New("PayTime不能为空")
return
}
return
}

View File

@ -0,0 +1,68 @@
package inner
import (
"errors"
"gitea.ddegame.cn/open/servicebase/pkg/common/HyTools"
"gitea.ddegame.cn/open/servicebase/pkg/constant"
)
type MwebRechargeRequest struct {
Mobile string
ProductId string
PayType string // 支付方式
RechargeChannel string // 充值平台 1 = APP-iOS 2= APP-Android 3= 微信公众号 4= 支付宝服务窗
ClientRealIp string // 客户端真实IP
OpenId string // 公众号支付时需要
DeviceOs string // 设备类型
CashAmount string // 自定义金额
}
// 参数合法性检验
func (request *MwebRechargeRequest) CheckParameter() (err error) {
if len(request.Mobile) == 0 {
err = errors.New("Mobile不能为空")
return
}
if len(request.ProductId) == 0 {
err = errors.New("ProductId不能为空")
return
}
if len(request.PayType) == 0 {
err = errors.New("PayType不能为空")
return
}
if len(request.RechargeChannel) == 0 {
err = errors.New("RechargeChannel不能为空")
return
}
//if request.RechargeChannel == "3" {
// if len(request.OpenId) == 0{
// err = errors.New("OpenID不能为空")
// return
// }
//}
// 自定义充值
if request.ProductId == constant.CustomerProductId {
if len(request.CashAmount) == 0 {
err = errors.New("自定义充值金额不能为空")
return
}
cash := HyTools.StringToInt(request.CashAmount)
if cash < 1 || cash > 80000 {
err = errors.New("自定义充值金额只能1到80000元")
return
}
}
return
}

View File

@ -0,0 +1,29 @@
package inner
import "errors"
type OpenBoxRequest struct {
AccessToken string
OpenCount string
}
// 参数合法性检验
func (request *OpenBoxRequest) CheckParameter() (err error) {
if len(request.AccessToken) == 0 {
err = errors.New("AccessToken不能为空")
return
}
if len(request.OpenCount) == 0 {
err = errors.New("OpenCount不能为空")
return
}
if request.OpenCount != "1" && request.OpenCount != "10" && request.OpenCount != "100" {
err = errors.New("OpenCount非法")
return
}
return
}

View File

@ -0,0 +1,25 @@
package inner
import "errors"
type OperationAddDiamondRequest struct {
UserNo string
DiamondAmount string
StaffId string
StaffName string
UserId string
Memo string
RoomProfitId string
RoomSubsidyDailyId string
}
// 参数合法性检验
func (request *OperationAddDiamondRequest) CheckParameter() (err error) {
if len(request.UserId) == 0 {
err = errors.New("UserId不能为空")
return
}
return
}

View File

@ -0,0 +1,32 @@
package inner
import "errors"
const (
OperationAddRevenueTypeDaily = "daily"
OperationAddRevenueTypeWeekly = "weekly"
OperationAddRevenueTypeGuild = "guild"
)
type OperationAddRevenueRequest struct {
AddType string // daily weekly
RoomProfitId string
GuildProfitId string
UserNo string
RevenueAmount string
StaffId string
StaffName string
UserId string
Memo string
}
// 参数合法性检验
func (request *OperationAddRevenueRequest) CheckParameter() (err error) {
if len(request.UserId) == 0 {
err = errors.New("UserId不能为空")
return
}
return
}

View File

@ -0,0 +1,28 @@
package inner
import "errors"
type OrderRechargeRequest struct {
OrderId string
PayType string // 支付方式
RechargeChannel string // 充值平台 1 = APP-iOS 2= APP-Android 3= 微信公众号 4= 支付宝服务窗
ClientRealIp string // 客户端真实IP
DeviceOs string // 设备类型
}
// 参数合法性检验
func (request *OrderRechargeRequest) CheckParameter() (err error) {
if len(request.OrderId) == 0 {
err = errors.New("OrderId不能为空")
return
}
if len(request.PayType) == 0 {
err = errors.New("PayType不能为空")
return
}
if len(request.RechargeChannel) == 0 {
err = errors.New("RechargeChannel不能为空")
return
}
return
}

View File

@ -0,0 +1,40 @@
package inner
import "errors"
type PayToCustomerByAlipayRequest struct {
OutId string
PayAmount string
TrueName string
AlipayAccount string
Remark string
}
// 参数合法性检验
func (request *PayToCustomerByAlipayRequest) CheckParameter() (err error) {
if len(request.OutId) == 0 {
err = errors.New("OutId不能为空")
return
}
if len(request.PayAmount) == 0 {
err = errors.New("PayAmount不能为空")
return
}
if len(request.AlipayAccount) == 0 {
err = errors.New("AlipayAccount不能为空")
return
}
if len(request.TrueName) == 0 {
err = errors.New("TrueName不能为空")
return
}
if len(request.Remark) == 0 {
err = errors.New("Remark不能为空")
return
}
return
}

View File

@ -0,0 +1,20 @@
package inner
import "errors"
type ReturnWithdrawRevenueRequest struct {
WithdrawId string
StaffUserName string
FailReason string
}
// 参数合法性检验
func (request *ReturnWithdrawRevenueRequest) CheckParameter() (err error) {
if len(request.WithdrawId) == 0 {
err = errors.New("WithdrawId不能为空")
return
}
return
}

View File

@ -0,0 +1,28 @@
package inner
import "errors"
type SendOfficalNoticeRequest struct {
UserId string
NoticeTitle string
NoticeContent string
ImgUrl string
LinkUrl string
Hours string
}
// 参数合法性检验
func (request *SendOfficalNoticeRequest) CheckParameter() (err error) {
if len(request.NoticeTitle) == 0 {
err = errors.New("NoticeTitle不能为空")
return
}
if len(request.NoticeContent) == 0 {
err = errors.New("NoticeTitle不能为空")
return
}
return
}

View File

@ -0,0 +1,18 @@
package inner
import "errors"
type UpdateYunXinInfoRequest struct {
UserId string
}
// 参数合法性检验
func (request *UpdateYunXinInfoRequest) CheckParameter() (err error) {
if len(request.UserId) == 0 {
err = errors.New("NoticeTitle不能为空")
return
}
return
}