印度包网
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
5.0 KiB

1 year ago
package values
import (
"server/common"
)
// GMAddCoinReq 后台修改玩家金币
// UID 玩家id
// Currency 货币类型
// Amount 请求的金币数量,可以是负数
type GMAddCoinReq struct {
UID int `json:"UID" binding:"required"`
CurrencyType common.CurrencyType `json:"CurrencyType" binding:"required"`
Amount int64 `json:"Amount" binding:"required"`
}
// GMRechargeReq 后台模拟充值
// UID 玩家id
// CurrencyType 请求的货币类型
// Amount 数量
type GMRechargeReq struct {
UID int `json:"UID" binding:"required"`
CurrencyType common.CurrencyType `json:"CurrencyType"`
Amount int64 `json:"Amount"`
ProductID int `json:"ProductID"`
}
// GMResetSignReq 后台重置签到
// UID 玩家id
// Type 请求重置的类型 1 今日 2 全部
type GMResetSignReq struct {
UID int `json:"UID" binding:"required"`
Type int `json:"Type" binding:"required"`
}
// GMBindPhoneReq 后台绑定手机
// UID 玩家id
// Phone 请求绑定的手机号
type GMBindPhoneReq struct {
UID int `json:"UID" binding:"required"`
Phone string `json:"Phone" binding:"required"`
}
// GMUnBindPhoneReq 后台解除绑定手机
// UID 玩家id
type GMUnBindPhoneReq struct {
UID int `json:"UID" binding:"required"`
}
// GMUnBindPhoneReq 后台获取手机验证码
// Phone 手机号
type GMGetPhoneCodeReq struct {
Phone string `json:"Phone" binding:"required"`
}
// GMGetPhoneCodeResp 后台获取手机验证码
// Code 验证码
type GMGetPhoneCodeResp struct {
Code string `json:"Code" binding:"required"`
}
// GMConfigPlatformListResp 后台获取平台配置参数
type GMConfigPlatformListResp struct {
Config *common.ConfigPlatform
}
// GMConfigPlatformEditReq 后台修改平台配置参数
type GMConfigPlatformEditReq struct {
Config *common.ConfigPlatform
}
// GMConfigCommonListResp 后台获取调控配置通用接口
type GMConfigCommonListResp struct {
Config interface{}
}
// GMConfigCommonEditReq 后台修改调控配置通用接口
type GMConfigCommonEditReq struct {
Config []map[string]interface{}
}
// GMConfigCommonDelReq 后台删除调控配置通用接口
type GMConfigCommonDelReq struct {
ID int
}
func GetControlType(path string) int {
switch path {
case "rwPer":
return common.ReloadConfigRWPer
case "all":
return common.ReloadConfigActivity
case "payProduct":
return common.ReloadConfigPayProduct
case "h5":
return common.ReloadConfigH5
case "tron":
return common.ReloadConfigTron
case "withdraw":
return common.ReloadConfigWithdrawProduct
case "gameProvider":
return common.ReloadConfigGameProvider
case "gameList":
return common.ReloadConfigGameList
case "gameTypes":
return common.ReloadConfigGameTypes
case "gameMarks":
return common.ReloadConfigGameMarks
case "firstPageGames":
return common.ReloadConfigFirstPageGames
case "vip":
return common.ReloadConfigVip
case "water":
return common.ReloadConfigWater
case "robot":
return common.ReloadConfigRobot
case "appSpin":
return common.ReloadConfigAppSpin
case "share":
return common.ReloadConfigShare
case "shareSys":
return common.ReloadConfigShareSys
case "pddSpin":
return common.ReloadConfigActivityPddSpin
case "pdd":
return common.ReloadConfigActivityPdd
case "task":
return common.ReloadConfigTask
case "currencyResource":
return common.ReloadConfigCurrencyResource
case "firstPay":
return common.ReloadConfigFirstPay
case "freespin":
return common.ReloadConfigActivityFreeSpin
case "firstRechargeBack":
return common.ReloadConfigActivityFirstRechargeBack
case "luckCode":
return common.ReloadConfigLuckyCode
case "banner":
return common.ReloadConfigBanner
case "sign":
return common.ReloadConfigActivitySign
case "breakGift":
return common.ReloadConfigActivityBreakGift
case "shareRobot":
return common.ReloadConfigShareRobot
case "weekCard":
return common.ReloadConfigActivityWeekCard
case "slots":
return common.ReloadConfigActivitySlots
case "luckyShop":
return common.ReloadConfigActivityLuckyShop
case "serverFlag":
return common.ReloadConfigServerFlag
case "sevenDayBox":
return common.ReloadConfigActivitySevenDayBox
case "super":
return common.ReloadConfigActivitySuper
1 year ago
case "tgRobot":
return common.ReloadConfigTgRobot
1 year ago
default:
return 0
}
}
// GMConfigReloadServerVersionReq 后台热更服务器更新
type GMConfigReloadServerVersionReq struct {
ServerID int
Version int
}
// GMConfigPayWeightResp 后台获取支付权重
type GMConfigPayWeightResp struct {
Config interface{}
Status int
}
// 强制玩家短线
type OptPlayerDisconnectReq struct {
UserId []int // 用户id
}
// CheckQueryControl 某些控制查询时,有特殊条件
func CheckQueryControl(data interface{}) (string, string) {
switch data.(type) {
case *common.ConfigActivityPddSpin:
return "", "amount_down,sort"
}
return "", ""
}
// CheckUpdateControl 某些控制更新时,有特殊条件
func CheckUpdateControl(data interface{}) {
}