活动代码优化
This commit is contained in:
parent
9a8b5d25ef
commit
737fea1e23
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
6ж├в├с├т├у├"║█ю└=
|
6т├у├ж├в├с├"║█ю└=
|
||||||
.ш├ь├ы├з├"║█ю└=
|
.з├ш├ь├ы├"║█ю└=
|
||||||
Wз├ш├с├т├ж├ы├у├в├ь├" ║█─╜Б
|
Wс├в├ь├ы├ш├т├у├ж├з├" ║█─╜Б
|
||||||
]ж├ь├з├ш├э├с├т├у├в├ы├"╒█Т
|
]т├у├ж├ы├з├э├с├в├ь├ш├"╒█Т
|
BIN
data/DB_Task.dat
BIN
data/DB_Task.dat
Binary file not shown.
|
@ -45,6 +45,7 @@ const (
|
||||||
ETCDKEY_ACT_BLINDBOX = "/game/act_blindbox"
|
ETCDKEY_ACT_BLINDBOX = "/game/act_blindbox"
|
||||||
ETCDKEY_ACT_FIRSTPAY = "/game/act_FirstPay"
|
ETCDKEY_ACT_FIRSTPAY = "/game/act_FirstPay"
|
||||||
ETCDKEY_ACT_CONTINUOUSPAY = "/game/act_ContinuousPay"
|
ETCDKEY_ACT_CONTINUOUSPAY = "/game/act_ContinuousPay"
|
||||||
|
ETCDKEY_ACT_Collect = "/game/act_collect"
|
||||||
ETCDKEY_VIP_CFG = "/game/VIPcfg"
|
ETCDKEY_VIP_CFG = "/game/VIPcfg"
|
||||||
ETCDKEY_WBCtrl_CFG = "/game/WBCtrlCfg"
|
ETCDKEY_WBCtrl_CFG = "/game/WBCtrlCfg"
|
||||||
ETCDKEY_PACKAGE_ENTRYSWITCH = "/game/plt/entryswitch/" //界面入口开关
|
ETCDKEY_PACKAGE_ENTRYSWITCH = "/game/plt/entryswitch/" //界面入口开关
|
||||||
|
|
|
@ -100,7 +100,7 @@ package transact
|
||||||
//
|
//
|
||||||
//func init() {
|
//func init() {
|
||||||
// //单控
|
// //单控
|
||||||
// WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/SinglePlayerAdjust", WebAPIHandlerWrapper(
|
// WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/SinglePlayerAdjust", WebAPIHandlerWrapper(
|
||||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
// pack := &webapi_proto.SASinglePlayerAdjust{}
|
// pack := &webapi_proto.SASinglePlayerAdjust{}
|
||||||
// msg := &webapi_proto.ASSinglePlayerAdjust{}
|
// msg := &webapi_proto.ASSinglePlayerAdjust{}
|
||||||
|
|
|
@ -185,5 +185,5 @@ func init() {
|
||||||
// //捕鱼渔场保留金币
|
// //捕鱼渔场保留金币
|
||||||
// admin.MyAdminApp.Route("/api/CoinPool/GameFishsAllCoin", GameSrvWebAPI)
|
// admin.MyAdminApp.Route("/api/CoinPool/GameFishsAllCoin", GameSrvWebAPI)
|
||||||
// //单控数据
|
// //单控数据
|
||||||
//admin.MyAdminApp.Route("/api/mongo.games.com/game/SinglePlayerAdjust", GameSrvWebAPI)
|
//admin.MyAdminApp.Route("/api/game/SinglePlayerAdjust", GameSrvWebAPI)
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,7 @@ func init() {
|
||||||
// 在线统计
|
// 在线统计
|
||||||
admin.MyAdminApp.Route("/api/Report/OnlineReportTotal", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/Report/OnlineReportTotal", WorldSrvApi)
|
||||||
// 加减金币钻石
|
// 加减金币钻石
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/AddCoinByIdAndPT", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/AddCoinByIdAndPT", WorldSrvApi)
|
||||||
// 查询玩家信息
|
// 查询玩家信息
|
||||||
admin.MyAdminApp.Route("/api/Player/PlayerData", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/Player/PlayerData", WorldSrvApi)
|
||||||
// 查询多个玩家信息
|
// 查询多个玩家信息
|
||||||
|
@ -210,17 +210,17 @@ func init() {
|
||||||
admin.MyAdminApp.Route("/api/Cache/UpdatePlayerElement", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/Cache/UpdatePlayerElement", WorldSrvApi)
|
||||||
|
|
||||||
// 水池相关
|
// 水池相关
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/QueryGamePoolByGameId", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/QueryGamePoolByGameId", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/QueryAllGamePool", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/QueryAllGamePool", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/RefreshGamePool", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/RefreshGamePool", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/UpdateGamePool", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/UpdateGamePool", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/ResetGamePool", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/ResetGamePool", WorldSrvApi)
|
||||||
|
|
||||||
// 邮箱相关
|
// 邮箱相关
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/CreateShortMessage", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/CreateShortMessage", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/QueryShortMessageList", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/QueryShortMessageList", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/DeleteShortMessage", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/DeleteShortMessage", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/DeleteAllShortMessage", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/DeleteAllShortMessage", WorldSrvApi)
|
||||||
|
|
||||||
// 获取房间列表
|
// 获取房间列表
|
||||||
admin.MyAdminApp.Route("/api/Cache/ListRoom", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/Cache/ListRoom", WorldSrvApi)
|
||||||
|
@ -233,12 +233,12 @@ func init() {
|
||||||
// 3方平台
|
// 3方平台
|
||||||
admin.MyAdminApp.Route("/api/thd/UpdatePlayerCoin", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/thd/UpdatePlayerCoin", WorldSrvApi)
|
||||||
// 兑换卷
|
// 兑换卷
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/CreateJYB", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/CreateJYB", WorldSrvApi)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/UpdateJYB", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/UpdateJYB", WorldSrvApi)
|
||||||
// 支付回调
|
// 支付回调
|
||||||
admin.MyAdminApp.Route("/api/pay/CallbackPayment", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/pay/CallbackPayment", WorldSrvApi)
|
||||||
// 资源变更(给所有玩家发送消息)
|
// 资源变更(给所有玩家发送消息)
|
||||||
admin.MyAdminApp.Route("/api/mongo.games.com/game/resource", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/game/resource", WorldSrvApi)
|
||||||
// 修改手机号
|
// 修改手机号
|
||||||
admin.MyAdminApp.Route("/api/player/update_tel", WorldSrvApi)
|
admin.MyAdminApp.Route("/api/player/update_tel", WorldSrvApi)
|
||||||
// 删除账号
|
// 删除账号
|
||||||
|
|
|
@ -82,7 +82,7 @@ func (TagCode) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_qpapi_proto_rawDescGZIP(), []int{0}
|
return file_qpapi_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[action] /api/Member/QPAPIRegisterOrLogin
|
// [action] /api/Member/QPAPIRegisterOrLogin
|
||||||
type ASLogin struct {
|
type ASLogin struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -225,8 +225,8 @@ func (x *SALogin) GetSnid() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//加币
|
// 加币
|
||||||
// [action] /api/mongo.games.com/game/QPAPIAddSubCoinById
|
// [action] /api/game/QPAPIAddSubCoinById
|
||||||
type ASAddCoinById struct {
|
type ASAddCoinById struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -433,7 +433,7 @@ func (x *PlayerCoinData) GetBank() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//查用户金币 /api/Member/QPGetMemberGoldById
|
// 查用户金币 /api/Member/QPGetMemberGoldById
|
||||||
type ASMemberGold struct {
|
type ASMemberGold struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -760,7 +760,7 @@ func (x *PlayerHistoryInfo) GetUserName() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取用户注单记录游戏记录 /api/Member/QPGetGameHistory
|
// 获取用户注单记录游戏记录 /api/Member/QPGetGameHistory
|
||||||
type SAPlayerHistory struct {
|
type SAPlayerHistory struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
|
@ -28,7 +28,7 @@ message SALogin{
|
||||||
}
|
}
|
||||||
|
|
||||||
//加币
|
//加币
|
||||||
// [action] /api/mongo.games.com/game/QPAPIAddSubCoinById
|
// [action] /api/game/QPAPIAddSubCoinById
|
||||||
message ASAddCoinById{
|
message ASAddCoinById{
|
||||||
string Username = 1; //用户名 //保证唯一性
|
string Username = 1; //用户名 //保证唯一性
|
||||||
int64 Gold = 2; //加币金额
|
int64 Gold = 2; //加币金额
|
||||||
|
|
|
@ -82,7 +82,7 @@ func (TagCode) EnumDescriptor() ([]byte, []int) {
|
||||||
return file_telegramapi_proto_rawDescGZIP(), []int{0}
|
return file_telegramapi_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[action] /api/Member/APIMemberRegisterOrLogin
|
// [action] /api/Member/APIMemberRegisterOrLogin
|
||||||
type ASLogin struct {
|
type ASLogin struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -233,8 +233,8 @@ func (x *SALogin) GetSnid() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//加币
|
// 加币
|
||||||
// [action] /api/mongo.games.com/game/APIAddCoinById
|
// [action] /api/game/APIAddCoinById
|
||||||
type ASAddCoinById struct {
|
type ASAddCoinById struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -481,7 +481,7 @@ func (x *PlayerCoinData) GetBank() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//查用户金币 /api/Member/GetMemberGoldById
|
// 查用户金币 /api/Member/GetMemberGoldById
|
||||||
type ASMemberGold struct {
|
type ASMemberGold struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -600,7 +600,7 @@ func (x *SAMemberGold) GetData() *PlayerCoinData {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//校验碰撞游戏Hash /api/mongo.games.com/game/CrashVerifier
|
// 校验碰撞游戏Hash /api/game/CrashVerifier
|
||||||
type ASCrachHash struct {
|
type ASCrachHash struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -887,7 +887,7 @@ func (x *PlayerHistoryInfo) GetMultiple() int64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取用户注单记录游戏记录 /api/Member/GetGameHistory
|
// 获取用户注单记录游戏记录 /api/Member/GetGameHistory
|
||||||
type SAPlayerHistory struct {
|
type SAPlayerHistory struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -959,7 +959,7 @@ func (x *SAPlayerHistory) GetGameHistory() []*GameHistoryInfo {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取用户注单记录游戏记录 /api/Member/GetGameHistory
|
// 获取用户注单记录游戏记录 /api/Member/GetGameHistory
|
||||||
type ASPlayerHistory struct {
|
type ASPlayerHistory struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
|
@ -29,7 +29,7 @@ message SALogin{
|
||||||
}
|
}
|
||||||
|
|
||||||
//加币
|
//加币
|
||||||
// [action] /api/mongo.games.com/game/APIAddCoinById
|
// [action] /api/game/APIAddCoinById
|
||||||
message ASAddCoinById{
|
message ASAddCoinById{
|
||||||
int32 ID = 1;//玩家id
|
int32 ID = 1;//玩家id
|
||||||
int64 Gold = 2;//加币金额
|
int64 Gold = 2;//加币金额
|
||||||
|
@ -66,7 +66,7 @@ message SAMemberGold{
|
||||||
PlayerCoinData Data = 3; //用户金币
|
PlayerCoinData Data = 3; //用户金币
|
||||||
}
|
}
|
||||||
|
|
||||||
//校验碰撞游戏Hash /api/mongo.games.com/game/CrashVerifier
|
//校验碰撞游戏Hash /api/game/CrashVerifier
|
||||||
message ASCrachHash{
|
message ASCrachHash{
|
||||||
string Hash = 1;//哈希值
|
string Hash = 1;//哈希值
|
||||||
int32 Wheel = 2;//第几轮
|
int32 Wheel = 2;//第几轮
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
package webapi
|
package webapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"mongo.games.com/game/protocol/server"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
"mongo.games.com/game/protocol/server"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
|
@ -3206,7 +3206,7 @@ func (x *ExchangeType) GetId() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/exchange_shop
|
// etcd /game/exchange_shop
|
||||||
type ExchangeShopList struct {
|
type ExchangeShopList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -3477,7 +3477,7 @@ func (x *ItemShop) GetFirstSwitch() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/item_shop
|
// etcd /game/item_shop
|
||||||
type ItemShopList struct {
|
type ItemShopList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -3900,7 +3900,7 @@ func (x *GameMatchDate) GetOnChannelName() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/game_match
|
// etcd /game/game_match
|
||||||
type GameMatchDateList struct {
|
type GameMatchDateList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4129,7 +4129,7 @@ func (x *WelfareTurnplateRate) GetRate() []int32 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_turnplate 转盘
|
// etcd /game/act_turnplate 转盘
|
||||||
type WelfareTurnplateDateList struct {
|
type WelfareTurnplateDateList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4319,7 +4319,7 @@ func (x *Welfare7SignDate) GetAddUpDate() []*AddUpWelfareDate {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_7sign 7日签到
|
// etcd /game/act_7sign 7日签到
|
||||||
type Welfare7SignDateList struct {
|
type Welfare7SignDateList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4494,7 +4494,7 @@ func (x *BlindBoxData) GetItem_Id() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_blindbox 盲盒
|
// etcd /game/act_blindbox 盲盒
|
||||||
type WelfareBlindBoxDataList struct {
|
type WelfareBlindBoxDataList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4669,7 +4669,7 @@ func (x *WelfareSpree) GetDiscount() float64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_FirstPay 首充
|
// etcd /game/act_FirstPay 首充
|
||||||
type WelfareFirstPayDataList struct {
|
type WelfareFirstPayDataList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4741,7 +4741,7 @@ func (x *WelfareFirstPayDataList) GetCycle() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_ContinuousPay 连续充值
|
// etcd /game/act_ContinuousPay 连续充值
|
||||||
type WelfareContinuousPayDataList struct {
|
type WelfareContinuousPayDataList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4988,7 +4988,7 @@ func (x *VIPcfg) GetShopId7() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/VIPcfg VIP配置
|
// etcd /game/VIPcfg VIP配置
|
||||||
type VIPcfgDataList struct {
|
type VIPcfgDataList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -5559,7 +5559,7 @@ func (x *GameConfig) GetGoodFenCha() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd mongo.games.com/game/act_phoneLottery
|
// etcd /game/act_phoneLottery
|
||||||
type WelfarePhoneLotteryStatus struct {
|
type WelfarePhoneLotteryStatus struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -5615,6 +5615,62 @@ func (x *WelfarePhoneLotteryStatus) GetSwitch() int32 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// etcd /game/act_collect
|
||||||
|
type WelfareCollectConfig struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"`
|
||||||
|
Switch int32 `protobuf:"varint,2,opt,name=Switch,proto3" json:"Switch,omitempty"` // 1.开启 2.关闭
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *WelfareCollectConfig) Reset() {
|
||||||
|
*x = WelfareCollectConfig{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_common_proto_msgTypes[54]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *WelfareCollectConfig) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*WelfareCollectConfig) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *WelfareCollectConfig) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_common_proto_msgTypes[54]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use WelfareCollectConfig.ProtoReflect.Descriptor instead.
|
||||||
|
func (*WelfareCollectConfig) Descriptor() ([]byte, []int) {
|
||||||
|
return file_common_proto_rawDescGZIP(), []int{54}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *WelfareCollectConfig) GetPlatform() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Platform
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *WelfareCollectConfig) GetSwitch() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Switch
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
var File_common_proto protoreflect.FileDescriptor
|
var File_common_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_common_proto_rawDesc = []byte{
|
var file_common_proto_rawDesc = []byte{
|
||||||
|
@ -6517,8 +6573,12 @@ var file_common_proto_rawDesc = []byte{
|
||||||
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||||
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74,
|
0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74,
|
||||||
0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
|
0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68,
|
||||||
0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x3b, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72,
|
0x22, 0x4a, 0x0a, 0x14, 0x57, 0x65, 0x6c, 0x66, 0x61, 0x72, 0x65, 0x43, 0x6f, 0x6c, 0x6c, 0x65,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
0x63, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||||
|
0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x6c, 0x61, 0x74,
|
||||||
|
0x66, 0x6f, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x18, 0x02,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x42, 0x0a, 0x5a, 0x08,
|
||||||
|
0x2e, 0x3b, 0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -6533,7 +6593,7 @@ func file_common_proto_rawDescGZIP() []byte {
|
||||||
return file_common_proto_rawDescData
|
return file_common_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 59)
|
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 60)
|
||||||
var file_common_proto_goTypes = []interface{}{
|
var file_common_proto_goTypes = []interface{}{
|
||||||
(*MysqlDbSetting)(nil), // 0: pb.MysqlDbSetting
|
(*MysqlDbSetting)(nil), // 0: pb.MysqlDbSetting
|
||||||
(*MongoDbSetting)(nil), // 1: pb.MongoDbSetting
|
(*MongoDbSetting)(nil), // 1: pb.MongoDbSetting
|
||||||
|
@ -6589,31 +6649,32 @@ var file_common_proto_goTypes = []interface{}{
|
||||||
(*PlayerPool)(nil), // 51: pb.PlayerPool
|
(*PlayerPool)(nil), // 51: pb.PlayerPool
|
||||||
(*GameConfig)(nil), // 52: pb.GameConfig
|
(*GameConfig)(nil), // 52: pb.GameConfig
|
||||||
(*WelfarePhoneLotteryStatus)(nil), // 53: pb.WelfarePhoneLotteryStatus
|
(*WelfarePhoneLotteryStatus)(nil), // 53: pb.WelfarePhoneLotteryStatus
|
||||||
nil, // 54: pb.Platform.BindTelRewardEntry
|
(*WelfareCollectConfig)(nil), // 54: pb.WelfareCollectConfig
|
||||||
nil, // 55: pb.PlayerData.RankScoreEntry
|
nil, // 55: pb.Platform.BindTelRewardEntry
|
||||||
nil, // 56: pb.ItemShop.AwardEntry
|
nil, // 56: pb.PlayerData.RankScoreEntry
|
||||||
nil, // 57: pb.VIPcfg.AwardEntry
|
nil, // 57: pb.ItemShop.AwardEntry
|
||||||
nil, // 58: pb.VIPcfg.Privilege7Entry
|
nil, // 58: pb.VIPcfg.AwardEntry
|
||||||
(*server.DB_GameFree)(nil), // 59: pbdata.DB_GameFree
|
nil, // 59: pb.VIPcfg.Privilege7Entry
|
||||||
|
(*server.DB_GameFree)(nil), // 60: pbdata.DB_GameFree
|
||||||
}
|
}
|
||||||
var file_common_proto_depIdxs = []int32{
|
var file_common_proto_depIdxs = []int32{
|
||||||
2, // 0: pb.Platform.Leaderboard:type_name -> pb.RankSwitch
|
2, // 0: pb.Platform.Leaderboard:type_name -> pb.RankSwitch
|
||||||
3, // 1: pb.Platform.ClubConfig:type_name -> pb.ClubConfig
|
3, // 1: pb.Platform.ClubConfig:type_name -> pb.ClubConfig
|
||||||
4, // 2: pb.Platform.ThirdGameMerchant:type_name -> pb.ThirdGame
|
4, // 2: pb.Platform.ThirdGameMerchant:type_name -> pb.ThirdGame
|
||||||
54, // 3: pb.Platform.BindTelReward:type_name -> pb.Platform.BindTelRewardEntry
|
55, // 3: pb.Platform.BindTelReward:type_name -> pb.Platform.BindTelRewardEntry
|
||||||
6, // 4: pb.GameConfigGlobal.GameStatus:type_name -> pb.GameStatus
|
6, // 4: pb.GameConfigGlobal.GameStatus:type_name -> pb.GameStatus
|
||||||
59, // 5: pb.GameFree.DbGameFree:type_name -> pbdata.DB_GameFree
|
60, // 5: pb.GameFree.DbGameFree:type_name -> pbdata.DB_GameFree
|
||||||
8, // 6: pb.PlatformGameConfig.DbGameFrees:type_name -> pb.GameFree
|
8, // 6: pb.PlatformGameConfig.DbGameFrees:type_name -> pb.GameFree
|
||||||
0, // 7: pb.PlatformDbConfig.Mysql:type_name -> pb.MysqlDbSetting
|
0, // 7: pb.PlatformDbConfig.Mysql:type_name -> pb.MysqlDbSetting
|
||||||
1, // 8: pb.PlatformDbConfig.MongoDb:type_name -> pb.MongoDbSetting
|
1, // 8: pb.PlatformDbConfig.MongoDb:type_name -> pb.MongoDbSetting
|
||||||
1, // 9: pb.PlatformDbConfig.MongoDbLog:type_name -> pb.MongoDbSetting
|
1, // 9: pb.PlatformDbConfig.MongoDbLog:type_name -> pb.MongoDbSetting
|
||||||
59, // 10: pb.GameConfigGroup.DbGameFree:type_name -> pbdata.DB_GameFree
|
60, // 10: pb.GameConfigGroup.DbGameFree:type_name -> pbdata.DB_GameFree
|
||||||
55, // 11: pb.PlayerData.RankScore:type_name -> pb.PlayerData.RankScoreEntry
|
56, // 11: pb.PlayerData.RankScore:type_name -> pb.PlayerData.RankScoreEntry
|
||||||
20, // 12: pb.OnlineReport.GameCount:type_name -> pb.OnlineGameCnt
|
20, // 12: pb.OnlineReport.GameCount:type_name -> pb.OnlineGameCnt
|
||||||
22, // 13: pb.CommonNoticeList.List:type_name -> pb.CommonNotice
|
22, // 13: pb.CommonNoticeList.List:type_name -> pb.CommonNotice
|
||||||
25, // 14: pb.ExchangeShop.ExType:type_name -> pb.ExchangeType
|
25, // 14: pb.ExchangeShop.ExType:type_name -> pb.ExchangeType
|
||||||
24, // 15: pb.ExchangeShopList.List:type_name -> pb.ExchangeShop
|
24, // 15: pb.ExchangeShopList.List:type_name -> pb.ExchangeShop
|
||||||
56, // 16: pb.ItemShop.Award:type_name -> pb.ItemShop.AwardEntry
|
57, // 16: pb.ItemShop.Award:type_name -> pb.ItemShop.AwardEntry
|
||||||
27, // 17: pb.ItemShopList.List:type_name -> pb.ItemShop
|
27, // 17: pb.ItemShopList.List:type_name -> pb.ItemShop
|
||||||
29, // 18: pb.MatchInfoAward.ItemId:type_name -> pb.ItemInfo
|
29, // 18: pb.MatchInfoAward.ItemId:type_name -> pb.ItemInfo
|
||||||
30, // 19: pb.GameMatchDate.Award:type_name -> pb.MatchInfoAward
|
30, // 19: pb.GameMatchDate.Award:type_name -> pb.MatchInfoAward
|
||||||
|
@ -6630,8 +6691,8 @@ var file_common_proto_depIdxs = []int32{
|
||||||
33, // 30: pb.WelfareSpree.Item:type_name -> pb.WelfareDate
|
33, // 30: pb.WelfareSpree.Item:type_name -> pb.WelfareDate
|
||||||
42, // 31: pb.WelfareFirstPayDataList.List:type_name -> pb.WelfareSpree
|
42, // 31: pb.WelfareFirstPayDataList.List:type_name -> pb.WelfareSpree
|
||||||
42, // 32: pb.WelfareContinuousPayDataList.List:type_name -> pb.WelfareSpree
|
42, // 32: pb.WelfareContinuousPayDataList.List:type_name -> pb.WelfareSpree
|
||||||
57, // 33: pb.VIPcfg.Award:type_name -> pb.VIPcfg.AwardEntry
|
58, // 33: pb.VIPcfg.Award:type_name -> pb.VIPcfg.AwardEntry
|
||||||
58, // 34: pb.VIPcfg.Privilege7:type_name -> pb.VIPcfg.Privilege7Entry
|
59, // 34: pb.VIPcfg.Privilege7:type_name -> pb.VIPcfg.Privilege7Entry
|
||||||
45, // 35: pb.VIPcfgDataList.List:type_name -> pb.VIPcfg
|
45, // 35: pb.VIPcfgDataList.List:type_name -> pb.VIPcfg
|
||||||
33, // 36: pb.ChessRankConfig.Item:type_name -> pb.WelfareDate
|
33, // 36: pb.ChessRankConfig.Item:type_name -> pb.WelfareDate
|
||||||
49, // 37: pb.ChessRankcfgData.Datas:type_name -> pb.ChessRankConfig
|
49, // 37: pb.ChessRankcfgData.Datas:type_name -> pb.ChessRankConfig
|
||||||
|
@ -7297,6 +7358,18 @@ func file_common_proto_init() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
file_common_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*WelfareCollectConfig); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
|
@ -7304,7 +7377,7 @@ func file_common_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_common_proto_rawDesc,
|
RawDescriptor: file_common_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 59,
|
NumMessages: 60,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -362,7 +362,7 @@ message ExchangeType{
|
||||||
int32 Id = 4; //行数
|
int32 Id = 4; //行数
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/exchange_shop
|
// etcd /game/exchange_shop
|
||||||
message ExchangeShopList{
|
message ExchangeShopList{
|
||||||
repeated ExchangeShop List = 1;
|
repeated ExchangeShop List = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -393,7 +393,7 @@ message ItemShop {
|
||||||
bool FirstSwitch = 22; //首冲翻倍开关
|
bool FirstSwitch = 22; //首冲翻倍开关
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/item_shop
|
// etcd /game/item_shop
|
||||||
message ItemShopList{
|
message ItemShopList{
|
||||||
repeated ItemShop List = 1;
|
repeated ItemShop List = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -441,7 +441,7 @@ message GameMatchDate {
|
||||||
repeated string OnChannelName = 23; // 开启的渠道名称
|
repeated string OnChannelName = 23; // 开启的渠道名称
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/game_match
|
// etcd /game/game_match
|
||||||
message GameMatchDateList{
|
message GameMatchDateList{
|
||||||
repeated GameMatchDate List = 1;
|
repeated GameMatchDate List = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -464,7 +464,7 @@ message WelfareTurnplateRate {
|
||||||
repeated int32 Rate = 1; // 转盘概率
|
repeated int32 Rate = 1; // 转盘概率
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_turnplate 转盘
|
// etcd /game/act_turnplate 转盘
|
||||||
message WelfareTurnplateDateList{
|
message WelfareTurnplateDateList{
|
||||||
repeated WelfareTurnplateDate List = 1; // 转盘奖励
|
repeated WelfareTurnplateDate List = 1; // 转盘奖励
|
||||||
repeated WelfareTurnplateRate RateList = 2; // 转盘概率
|
repeated WelfareTurnplateRate RateList = 2; // 转盘概率
|
||||||
|
@ -484,7 +484,7 @@ message Welfare7SignDate {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_7sign 7日签到
|
// etcd /game/act_7sign 7日签到
|
||||||
message Welfare7SignDateList{
|
message Welfare7SignDateList{
|
||||||
repeated Welfare7SignDate List = 1; // 七日签到
|
repeated Welfare7SignDate List = 1; // 七日签到
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -503,7 +503,7 @@ message BlindBoxData {
|
||||||
int32 Item_Id = 9; // 道具id
|
int32 Item_Id = 9; // 道具id
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_blindbox 盲盒
|
// etcd /game/act_blindbox 盲盒
|
||||||
message WelfareBlindBoxDataList{
|
message WelfareBlindBoxDataList{
|
||||||
repeated BlindBoxData List = 1; // 盲盒
|
repeated BlindBoxData List = 1; // 盲盒
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -522,7 +522,7 @@ message WelfareSpree {
|
||||||
double Discount = 8; // 折扣
|
double Discount = 8; // 折扣
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_FirstPay 首充
|
// etcd /game/act_FirstPay 首充
|
||||||
message WelfareFirstPayDataList{
|
message WelfareFirstPayDataList{
|
||||||
repeated WelfareSpree List = 1;
|
repeated WelfareSpree List = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -530,7 +530,7 @@ message WelfareFirstPayDataList{
|
||||||
int32 Cycle = 4; // 循环 1.开启 2.关闭
|
int32 Cycle = 4; // 循环 1.开启 2.关闭
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/act_ContinuousPay 连续充值
|
// etcd /game/act_ContinuousPay 连续充值
|
||||||
message WelfareContinuousPayDataList{
|
message WelfareContinuousPayDataList{
|
||||||
repeated WelfareSpree List = 1; // 连续充值
|
repeated WelfareSpree List = 1; // 连续充值
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -558,7 +558,7 @@ message VIPcfg {
|
||||||
int32 ShopId7 = 16;
|
int32 ShopId7 = 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd /mongo.games.com/game/VIPcfg VIP配置
|
// etcd /game/VIPcfg VIP配置
|
||||||
message VIPcfgDataList{
|
message VIPcfgDataList{
|
||||||
repeated VIPcfg List = 1; // VIP配置
|
repeated VIPcfg List = 1; // VIP配置
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -618,8 +618,14 @@ message GameConfig {
|
||||||
int32 GoodFenCha = 7; // 好牌分差值
|
int32 GoodFenCha = 7; // 好牌分差值
|
||||||
}
|
}
|
||||||
|
|
||||||
// etcd mongo.games.com/game/act_phoneLottery
|
// etcd /game/act_phoneLottery
|
||||||
message WelfarePhoneLotteryStatus{
|
message WelfarePhoneLotteryStatus{
|
||||||
string Platform = 1;
|
string Platform = 1;
|
||||||
int32 Switch = 2; // 1.开启 2.关闭
|
int32 Switch = 2; // 1.开启 2.关闭
|
||||||
|
}
|
||||||
|
|
||||||
|
// etcd /game/act_collect
|
||||||
|
message WelfareCollectConfig{
|
||||||
|
string Platform = 1;
|
||||||
|
int32 Switch = 2; // 1.开启 2.关闭
|
||||||
}
|
}
|
|
@ -1000,7 +1000,7 @@ func (x *SAUpdateGameConfigGroup) GetMsg() string {
|
||||||
|
|
||||||
// /////////////////////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////////////////////
|
||||||
// 加币
|
// 加币
|
||||||
// [action] /api/mongo.games.com/game/AddCoinById
|
// [action] /api/game/AddCoinById
|
||||||
type ASAddCoinById struct {
|
type ASAddCoinById struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1185,7 +1185,7 @@ func (x *SAAddCoinById) GetMsg() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重置水池
|
// 重置水池
|
||||||
// [action] /api/mongo.games.com/game/ResetGamePool
|
// [action] /api/game/ResetGamePool
|
||||||
type ASResetGamePool struct {
|
type ASResetGamePool struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1329,7 +1329,7 @@ func (x *SAResetGamePool) GetMsg() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新水池
|
// 更新水池
|
||||||
// [action] /api/mongo.games.com/game/UpdateGamePool
|
// [action] /api/game/UpdateGamePool
|
||||||
type ASUpdateGamePool struct {
|
type ASUpdateGamePool struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1492,7 +1492,7 @@ func (x *SAUpdateGamePool) GetMsg() string {
|
||||||
// ResetTime
|
// ResetTime
|
||||||
// //////////////////////////////////////////////////
|
// //////////////////////////////////////////////////
|
||||||
// 查询水池gameid
|
// 查询水池gameid
|
||||||
// [action] /api/mongo.games.com/game/QueryGamePoolByGameId
|
// [action] /api/game/QueryGamePoolByGameId
|
||||||
type ASQueryGamePoolByGameId struct {
|
type ASQueryGamePoolByGameId struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -1628,7 +1628,7 @@ func (x *SAQueryGamePoolByGameId) GetCoinPoolSetting() []*CoinPoolSetting {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询水池
|
// 查询水池
|
||||||
// [action] /api/mongo.games.com/game/QueryAllGamePool
|
// [action] /api/game/QueryAllGamePool
|
||||||
type ASQueryAllGamePool struct {
|
type ASQueryAllGamePool struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -2258,7 +2258,7 @@ func (x *SADestroyRoom) GetMsg() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 单控
|
// 单控
|
||||||
// [action] /api/mongo.games.com/game/SinglePlayerAdjust
|
// [action] /api/game/SinglePlayerAdjust
|
||||||
// PACKET_WG_SINGLEADJUST
|
// PACKET_WG_SINGLEADJUST
|
||||||
type ASSinglePlayerAdjust struct {
|
type ASSinglePlayerAdjust struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
|
@ -3861,7 +3861,7 @@ func (x *SABlackBySnId) GetMsg() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 邮件
|
// 邮件
|
||||||
// [action] /api/mongo.games.com/game/CreateShortMessage
|
// [action] /api/game/CreateShortMessage
|
||||||
type ASCreateShortMessage struct {
|
type ASCreateShortMessage struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4036,7 +4036,7 @@ func (x *SACreateShortMessage) GetMsg() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// [action] /api/mongo.games.com/game/QueryShortMessageList
|
// [action] /api/game/QueryShortMessageList
|
||||||
type ASQueryShortMessageList struct {
|
type ASQueryShortMessageList struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -4203,7 +4203,7 @@ func (x *SAQueryShortMessageList) GetMessageInfo() []*MessageInfo {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// [action] /api/mongo.games.com/game/DeleteShortMessage
|
// [action] /api/game/DeleteShortMessage
|
||||||
type ASDeleteShortMessage struct {
|
type ASDeleteShortMessage struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -5290,7 +5290,7 @@ func (x *SAOnlineReportTotal) GetOnlineReport() *OnlineReport {
|
||||||
|
|
||||||
// /////////////////////////////////////////////////////////////////////////////////////
|
// /////////////////////////////////////////////////////////////////////////////////////
|
||||||
// 加币
|
// 加币
|
||||||
// [action] /api/mongo.games.com/game/AddCoinByIdAndPT
|
// [action] /api/game/AddCoinByIdAndPT
|
||||||
type ASAddCoinByIdAndPT struct {
|
type ASAddCoinByIdAndPT struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -5522,7 +5522,7 @@ func (x *JybInfoAward) GetDiamond() int64 {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成兑换码
|
// 生成兑换码
|
||||||
// [action] /api/mongo.games.com/game/CreateJYB
|
// [action] /api/game/CreateJYB
|
||||||
type ASCreateJYB struct {
|
type ASCreateJYB struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -5707,7 +5707,7 @@ func (x *SACreateJYB) GetMsg() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 操作兑换码 删除 修改
|
// 操作兑换码 删除 修改
|
||||||
// [action] /api/mongo.games.com/game/UpdateJYB
|
// [action] /api/game/UpdateJYB
|
||||||
type ASUpdateJYB struct {
|
type ASUpdateJYB struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -7618,7 +7618,7 @@ func (x *SACallbackPayment) GetMsg() string {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// 资源更新通知 [/api/mongo.games.com/game/resource]
|
// 资源更新通知 [/api/game/resource]
|
||||||
type ASResource struct {
|
type ASResource struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
|
|
@ -163,7 +163,7 @@ message SAUpdateGameConfigGroup {
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//加币
|
//加币
|
||||||
// [action] /api/mongo.games.com/game/AddCoinById
|
// [action] /api/game/AddCoinById
|
||||||
message ASAddCoinById{
|
message ASAddCoinById{
|
||||||
int32 ID = 1;//玩家id
|
int32 ID = 1;//玩家id
|
||||||
int64 Gold = 2;//加币金额
|
int64 Gold = 2;//加币金额
|
||||||
|
@ -183,7 +183,7 @@ message SAAddCoinById {
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
//重置水池
|
//重置水池
|
||||||
// [action] /api/mongo.games.com/game/ResetGamePool
|
// [action] /api/game/ResetGamePool
|
||||||
message ASResetGamePool{
|
message ASResetGamePool{
|
||||||
int32 GameFreeId = 1;
|
int32 GameFreeId = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -197,7 +197,7 @@ message SAResetGamePool{
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
//更新水池
|
//更新水池
|
||||||
// [action] /api/mongo.games.com/game/UpdateGamePool
|
// [action] /api/game/UpdateGamePool
|
||||||
message ASUpdateGamePool{
|
message ASUpdateGamePool{
|
||||||
int32 GameFreeId = 1;
|
int32 GameFreeId = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -237,7 +237,7 @@ message SAUpdateGamePool{
|
||||||
//ResetTime
|
//ResetTime
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
//查询水池gameid
|
//查询水池gameid
|
||||||
// [action] /api/mongo.games.com/game/QueryGamePoolByGameId
|
// [action] /api/game/QueryGamePoolByGameId
|
||||||
message ASQueryGamePoolByGameId{
|
message ASQueryGamePoolByGameId{
|
||||||
int32 GameId = 1;
|
int32 GameId = 1;
|
||||||
int32 GameMode = 2;
|
int32 GameMode = 2;
|
||||||
|
@ -250,7 +250,7 @@ message SAQueryGamePoolByGameId{
|
||||||
repeated pb.CoinPoolSetting CoinPoolSetting = 3;
|
repeated pb.CoinPoolSetting CoinPoolSetting = 3;
|
||||||
}
|
}
|
||||||
//查询水池
|
//查询水池
|
||||||
// [action] /api/mongo.games.com/game/QueryAllGamePool
|
// [action] /api/game/QueryAllGamePool
|
||||||
message ASQueryAllGamePool{
|
message ASQueryAllGamePool{
|
||||||
int32 PageNo = 1;
|
int32 PageNo = 1;
|
||||||
int32 PageSize = 2;
|
int32 PageSize = 2;
|
||||||
|
@ -309,7 +309,7 @@ message SADestroyRoom{
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
//单控
|
//单控
|
||||||
// [action] /api/mongo.games.com/game/SinglePlayerAdjust
|
// [action] /api/game/SinglePlayerAdjust
|
||||||
//PACKET_WG_SINGLEADJUST
|
//PACKET_WG_SINGLEADJUST
|
||||||
message ASSinglePlayerAdjust{
|
message ASSinglePlayerAdjust{
|
||||||
int32 Opration = 1;//1.add 2.edit 3.del 4.查询最新的
|
int32 Opration = 1;//1.add 2.edit 3.del 4.查询最新的
|
||||||
|
@ -455,7 +455,7 @@ message SABlackBySnId{
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
//邮件
|
//邮件
|
||||||
// [action] /api/mongo.games.com/game/CreateShortMessage
|
// [action] /api/game/CreateShortMessage
|
||||||
message ASCreateShortMessage{
|
message ASCreateShortMessage{
|
||||||
string NoticeTitle = 1;
|
string NoticeTitle = 1;
|
||||||
string NoticeContent = 2;
|
string NoticeContent = 2;
|
||||||
|
@ -472,7 +472,7 @@ message SACreateShortMessage{
|
||||||
TagCode Tag = 1; //错误码
|
TagCode Tag = 1; //错误码
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
// [action] /api/mongo.games.com/game/QueryShortMessageList
|
// [action] /api/game/QueryShortMessageList
|
||||||
message ASQueryShortMessageList{
|
message ASQueryShortMessageList{
|
||||||
int64 StartTime = 1;
|
int64 StartTime = 1;
|
||||||
int64 EndTime = 2;
|
int64 EndTime = 2;
|
||||||
|
@ -488,7 +488,7 @@ message SAQueryShortMessageList{
|
||||||
int32 Count = 3;
|
int32 Count = 3;
|
||||||
repeated pb.MessageInfo MessageInfo = 4;
|
repeated pb.MessageInfo MessageInfo = 4;
|
||||||
}
|
}
|
||||||
// [action] /api/mongo.games.com/game/DeleteShortMessage
|
// [action] /api/game/DeleteShortMessage
|
||||||
message ASDeleteShortMessage{
|
message ASDeleteShortMessage{
|
||||||
string Id = 1;
|
string Id = 1;
|
||||||
string Platform = 2;
|
string Platform = 2;
|
||||||
|
@ -589,7 +589,7 @@ message SAOnlineReportTotal{
|
||||||
}
|
}
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//加币
|
//加币
|
||||||
// [action] /api/mongo.games.com/game/AddCoinByIdAndPT
|
// [action] /api/game/AddCoinByIdAndPT
|
||||||
message ASAddCoinByIdAndPT{
|
message ASAddCoinByIdAndPT{
|
||||||
int32 ID = 1;//玩家id
|
int32 ID = 1;//玩家id
|
||||||
string Platform = 2;//平台号
|
string Platform = 2;//平台号
|
||||||
|
@ -615,7 +615,7 @@ message JybInfoAward {
|
||||||
}
|
}
|
||||||
|
|
||||||
//生成兑换码
|
//生成兑换码
|
||||||
// [action] /api/mongo.games.com/game/CreateJYB
|
// [action] /api/game/CreateJYB
|
||||||
message ASCreateJYB {
|
message ASCreateJYB {
|
||||||
string Platform = 1; // 平台
|
string Platform = 1; // 平台
|
||||||
string Name = 2; // 礼包名称
|
string Name = 2; // 礼包名称
|
||||||
|
@ -636,7 +636,7 @@ message SACreateJYB {
|
||||||
}
|
}
|
||||||
|
|
||||||
//操作兑换码 删除 修改
|
//操作兑换码 删除 修改
|
||||||
// [action] /api/mongo.games.com/game/UpdateJYB
|
// [action] /api/game/UpdateJYB
|
||||||
message ASUpdateJYB {
|
message ASUpdateJYB {
|
||||||
string Platform = 1; // 平台
|
string Platform = 1; // 平台
|
||||||
string JYBID = 2; // 礼包ID
|
string JYBID = 2; // 礼包ID
|
||||||
|
@ -824,7 +824,7 @@ message SACallbackPayment{
|
||||||
string Msg = 2; //错误信息(选填)
|
string Msg = 2; //错误信息(选填)
|
||||||
}
|
}
|
||||||
|
|
||||||
//资源更新通知 [/api/mongo.games.com/game/resource]
|
//资源更新通知 [/api/game/resource]
|
||||||
message ASResource{
|
message ASResource{
|
||||||
string Msg = 1; //信息
|
string Msg = 1; //信息
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
"IsDevMode":true
|
"IsDevMode":true
|
||||||
},
|
},
|
||||||
"costum":{
|
"costum":{
|
||||||
"PromotersUrl":"http://192.168.0.65/jxjy/tg/mongo.games.com/game/push_order",
|
"PromotersUrl":"http://192.168.0.65/jxjy/tg/game/push_order",
|
||||||
"etcdurl":["127.0.0.1:2379"],
|
"etcdurl":["127.0.0.1:2379"],
|
||||||
"etcduser":"root",
|
"etcduser":"root",
|
||||||
"etcdpwd":"win88",
|
"etcdpwd":"win88",
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
"IsDevMode":true
|
"IsDevMode":true
|
||||||
},
|
},
|
||||||
"costum":{
|
"costum":{
|
||||||
"PromotersUrl":"http://192.168.0.65/jxjy/tg/mongo.games.com/game/push_order",
|
"PromotersUrl":"http://192.168.0.65/jxjy/tg/game/push_order",
|
||||||
"etcdurl":["192.168.31.18:2379"],
|
"etcdurl":["192.168.31.18:2379"],
|
||||||
"etcduser":"root",
|
"etcduser":"root",
|
||||||
"etcdpwd":"win88",
|
"etcdpwd":"win88",
|
||||||
|
|
|
@ -12,29 +12,37 @@ func init() {
|
||||||
// 个人水池配置
|
// 个人水池配置
|
||||||
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, PlatformConfigEtcd)
|
etcd.Register(etcd.ETCDKEY_PLAYERPOOL, webapi.PlayerPool{}, PlatformConfigEtcd)
|
||||||
// 商品兑换
|
// 商品兑换
|
||||||
etcd.Register(etcd.ETCDKEY_SHOP_EXCHANGE, webapi.ExchangeShopList{}, func(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
etcd.Register(etcd.ETCDKEY_SHOP_EXCHANGE, webapi.ExchangeShopList{}, ExchangeShopList)
|
||||||
if event.Type == clientv3.EventTypeDelete {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
config, ok := data.(*webapi.ExchangeShopList)
|
|
||||||
if !ok {
|
|
||||||
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
ShopMgrSington.UpExShop(config)
|
|
||||||
})
|
|
||||||
// 商城商品
|
// 商城商品
|
||||||
etcd.Register(etcd.ETCDKEY_SHOP_ITEM, webapi.ItemShopList{}, func(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
etcd.Register(etcd.ETCDKEY_SHOP_ITEM, webapi.ItemShopList{}, ItemShopList)
|
||||||
if event.Type == clientv3.EventTypeDelete {
|
// 集卡活动
|
||||||
return
|
etcd.Register(etcd.ETCDKEY_ACT_Collect, webapi.WelfareCollectConfig{}, WelfareCollectConfig)
|
||||||
}
|
}
|
||||||
config, ok := data.(*webapi.ItemShopList)
|
|
||||||
if !ok {
|
//func ExchangeShopList(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {}
|
||||||
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
|
||||||
return
|
func WelfareCollectConfig(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||||
}
|
if event.Type == clientv3.EventTypeDelete {
|
||||||
ShopMgrSington.UpdateItemShop(config)
|
return
|
||||||
})
|
}
|
||||||
|
config, ok := data.(*webapi.WelfareCollectConfig)
|
||||||
|
if !ok {
|
||||||
|
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
WelfareMgrSington.UpdateCollectConfig(config)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ItemShopList(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||||
|
if event.Type == clientv3.EventTypeDelete {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
config, ok := data.(*webapi.ItemShopList)
|
||||||
|
if !ok {
|
||||||
|
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ShopMgrSington.UpdateItemShop(config)
|
||||||
}
|
}
|
||||||
|
|
||||||
func PlatformConfigEtcd(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
func PlatformConfigEtcd(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||||
|
@ -43,3 +51,15 @@ func PlatformConfigEtcd(completeKey string, isInit bool, event *clientv3.Event,
|
||||||
}
|
}
|
||||||
PlatformMgrSingleton.UpdateConfig(data)
|
PlatformMgrSingleton.UpdateConfig(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func ExchangeShopList(completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||||
|
if event.Type == clientv3.EventTypeDelete {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
config, ok := data.(*webapi.ExchangeShopList)
|
||||||
|
if !ok {
|
||||||
|
logger.Logger.Errorf("etcd completeKey:%s, data type error", completeKey)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ShopMgrSington.UpExShop(config)
|
||||||
|
}
|
||||||
|
|
|
@ -276,7 +276,7 @@ func (this *EtcdMgr) InitPlatformPackage() {
|
||||||
//}
|
//}
|
||||||
//if value.AppStore != 1 {
|
//if value.AppStore != 1 {
|
||||||
// uptCnt := PlayerMgrSington.UpdateAllPlayerPackageTag(value.Tag, strPlatorm, strChannel, strPromoter, int32(value.PromoterTree), value.TagKey)
|
// uptCnt := PlayerMgrSington.UpdateAllPlayerPackageTag(value.Tag, strPlatorm, strChannel, strPromoter, int32(value.PromoterTree), value.TagKey)
|
||||||
// logger.Logger.Infof("/api/mongo.games.com/game/UpsertPackageTag update(tag:%v, platform:%v, channel:%v, promoter:%v), updated cnt=%v", value.Tag, strPlatorm, strChannel, strPromoter, uptCnt)
|
// logger.Logger.Infof("/api/game/UpsertPackageTag update(tag:%v, platform:%v, channel:%v, promoter:%v), updated cnt=%v", value.Tag, strPlatorm, strChannel, strPromoter, uptCnt)
|
||||||
// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} {
|
||||||
// return model.UpdateAllPlayerPackageTag(value.Tag, strPlatorm, strChannel, strPromoter, int32(value.PromoterTree), value.TagKey)
|
// return model.UpdateAllPlayerPackageTag(value.Tag, strPlatorm, strChannel, strPromoter, int32(value.PromoterTree), value.TagKey)
|
||||||
// }), nil, "UpdateAllPlayerPackageTag").Start()
|
// }), nil, "UpdateAllPlayerPackageTag").Start()
|
||||||
|
|
|
@ -290,7 +290,7 @@ func init() {
|
||||||
// }))
|
// }))
|
||||||
|
|
||||||
//API用户加减币
|
//API用户加减币
|
||||||
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/APIAddSubCoinById", WebAPIHandlerWrapper(
|
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/APIAddSubCoinById", WebAPIHandlerWrapper(
|
||||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
// pack := &webapi.SAAddCoinById{}
|
// pack := &webapi.SAAddCoinById{}
|
||||||
// msg := &webapi.ASAddCoinById{}
|
// msg := &webapi.ASAddCoinById{}
|
||||||
|
@ -787,7 +787,7 @@ func init() {
|
||||||
// }))
|
// }))
|
||||||
|
|
||||||
//API用户加减币
|
//API用户加减币
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/QPAPIAddSubCoinById", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/QPAPIAddSubCoinById", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &qpapi.SAAddCoinById{}
|
pack := &qpapi.SAAddCoinById{}
|
||||||
msg := &qpapi.ASAddCoinById{}
|
msg := &qpapi.ASAddCoinById{}
|
||||||
|
@ -1390,9 +1390,9 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
//Cresh游戏Hash校验
|
//Cresh游戏Hash校验
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/CrashVerifier", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/CrashVerifier", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
logger.Logger.Trace("WebAPIHandler:/api/mongo.games.com/game/CrashVerifier", params)
|
logger.Logger.Trace("WebAPIHandler:/api/game/CrashVerifier", params)
|
||||||
resp := &webapi.SACrachHash{}
|
resp := &webapi.SACrachHash{}
|
||||||
msg := &webapi.ASCrachHash{}
|
msg := &webapi.ASCrachHash{}
|
||||||
err := proto.Unmarshal(params, msg)
|
err := proto.Unmarshal(params, msg)
|
||||||
|
@ -1610,7 +1610,7 @@ func init() {
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------
|
||||||
//加币加钻石
|
//加币加钻石
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/AddCoinByIdAndPT", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/AddCoinByIdAndPT", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAAddCoinByIdAndPT{}
|
pack := &webapi_proto.SAAddCoinByIdAndPT{}
|
||||||
msg := &webapi_proto.ASAddCoinByIdAndPT{}
|
msg := &webapi_proto.ASAddCoinByIdAndPT{}
|
||||||
|
@ -1794,7 +1794,7 @@ func init() {
|
||||||
|
|
||||||
// //-------------------------------------------------------------------------------------------------------
|
// //-------------------------------------------------------------------------------------------------------
|
||||||
// //钱包操作接口
|
// //钱包操作接口
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/AddCoinById", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/AddCoinById", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAAddCoinById{}
|
pack := &webapi_proto.SAAddCoinById{}
|
||||||
msg := &webapi_proto.ASAddCoinById{}
|
msg := &webapi_proto.ASAddCoinById{}
|
||||||
|
@ -2062,7 +2062,7 @@ func init() {
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
//重置水池
|
//重置水池
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/ResetGamePool", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/ResetGamePool", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAResetGamePool{}
|
pack := &webapi_proto.SAResetGamePool{}
|
||||||
msg := &webapi_proto.ASResetGamePool{}
|
msg := &webapi_proto.ASResetGamePool{}
|
||||||
|
@ -2100,7 +2100,7 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
// 水池开关
|
// 水池开关
|
||||||
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/GamePoolSwitch", WebAPIHandlerWrapper(
|
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/GamePoolSwitch", WebAPIHandlerWrapper(
|
||||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
// pack := &webapi_proto.SAGamePoolSwitch{}
|
// pack := &webapi_proto.SAGamePoolSwitch{}
|
||||||
// msg := &webapi_proto.ASGamePoolSwitch{}
|
// msg := &webapi_proto.ASGamePoolSwitch{}
|
||||||
|
@ -2137,7 +2137,7 @@ func init() {
|
||||||
|
|
||||||
//更新水池
|
//更新水池
|
||||||
// 修改本地缓存,修改数据库,同步到gamesrv
|
// 修改本地缓存,修改数据库,同步到gamesrv
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/UpdateGamePool", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/UpdateGamePool", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAUpdateGamePool{}
|
pack := &webapi_proto.SAUpdateGamePool{}
|
||||||
msg := &webapi_proto.ASUpdateGamePool{}
|
msg := &webapi_proto.ASUpdateGamePool{}
|
||||||
|
@ -2211,7 +2211,7 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
//查询水池gameid
|
//查询水池gameid
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/QueryGamePoolByGameId", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/QueryGamePoolByGameId", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAQueryGamePoolByGameId{}
|
pack := &webapi_proto.SAQueryGamePoolByGameId{}
|
||||||
msg := &webapi_proto.ASQueryGamePoolByGameId{}
|
msg := &webapi_proto.ASQueryGamePoolByGameId{}
|
||||||
|
@ -2226,7 +2226,7 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
//查询水池
|
//查询水池
|
||||||
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/QueryAllGamePool", WebAPIHandlerWrapper(
|
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/QueryAllGamePool", WebAPIHandlerWrapper(
|
||||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
// pack := &webapi_proto.SAQueryAllGamePool{}
|
// pack := &webapi_proto.SAQueryAllGamePool{}
|
||||||
// msg := &webapi_proto.ASQueryAllGamePool{}
|
// msg := &webapi_proto.ASQueryAllGamePool{}
|
||||||
|
@ -3188,7 +3188,7 @@ func init() {
|
||||||
return common.ResponseTag_Ok, pack
|
return common.ResponseTag_Ok, pack
|
||||||
}))
|
}))
|
||||||
//邮件
|
//邮件
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/CreateShortMessage", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/CreateShortMessage", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SACreateShortMessage{}
|
pack := &webapi_proto.SACreateShortMessage{}
|
||||||
msg := &webapi_proto.ASCreateShortMessage{}
|
msg := &webapi_proto.ASCreateShortMessage{}
|
||||||
|
@ -3250,7 +3250,7 @@ func init() {
|
||||||
err := model.InsertMessage(platform, newMsg)
|
err := model.InsertMessage(platform, newMsg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = login_proto.OpResultCode_OPRC_Error
|
code = login_proto.OpResultCode_OPRC_Error
|
||||||
logger.Logger.Errorf("/api/mongo.games.com/game/CreateShortMessage,InsertMessage err:%v title:%v content:%v platform:%v srcSnid:%v destSnid:%v messageType:%v ", err, title, content, platform, srcSnid, destSnid, messageType)
|
logger.Logger.Errorf("/api/game/CreateShortMessage,InsertMessage err:%v title:%v content:%v platform:%v srcSnid:%v destSnid:%v messageType:%v ", err, title, content, platform, srcSnid, destSnid, messageType)
|
||||||
return code
|
return code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3266,7 +3266,7 @@ func init() {
|
||||||
if len(dbMsgs) > 0 {
|
if len(dbMsgs) > 0 {
|
||||||
err := model.InsertMessage(platform, dbMsgs...)
|
err := model.InsertMessage(platform, dbMsgs...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Logger.Errorf("/api/mongo.games.com/game/CreateShortMessage,InsertMessage err:%v title:%v content:%v platform:%v srcSnid:%v destSnid:%v messageType:%v ", err, title, content, platform, srcSnid, destSnid, messageType)
|
logger.Logger.Errorf("/api/game/CreateShortMessage,InsertMessage err:%v title:%v content:%v platform:%v srcSnid:%v destSnid:%v messageType:%v ", err, title, content, platform, srcSnid, destSnid, messageType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3318,7 +3318,7 @@ func init() {
|
||||||
return common.ResponseTag_TransactYield, pack
|
return common.ResponseTag_TransactYield, pack
|
||||||
}))
|
}))
|
||||||
//查询邮件
|
//查询邮件
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/QueryShortMessageList", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/QueryShortMessageList", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAQueryShortMessageList{}
|
pack := &webapi_proto.SAQueryShortMessageList{}
|
||||||
msg := &webapi_proto.ASQueryShortMessageList{}
|
msg := &webapi_proto.ASQueryShortMessageList{}
|
||||||
|
@ -3390,7 +3390,7 @@ func init() {
|
||||||
return common.ResponseTag_TransactYield, pack
|
return common.ResponseTag_TransactYield, pack
|
||||||
}))
|
}))
|
||||||
//删除邮件
|
//删除邮件
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/DeleteShortMessage", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/DeleteShortMessage", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SADeleteShortMessage{}
|
pack := &webapi_proto.SADeleteShortMessage{}
|
||||||
msg := &webapi_proto.ASDeleteShortMessage{}
|
msg := &webapi_proto.ASDeleteShortMessage{}
|
||||||
|
@ -3452,7 +3452,7 @@ func init() {
|
||||||
return common.ResponseTag_TransactYield, pack
|
return common.ResponseTag_TransactYield, pack
|
||||||
}))
|
}))
|
||||||
//删除玩家已经删除的邮件
|
//删除玩家已经删除的邮件
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/DeleteAllShortMessage", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/DeleteAllShortMessage", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SADeleteShortMessage{}
|
pack := &webapi_proto.SADeleteShortMessage{}
|
||||||
msg := &webapi_proto.ASDeleteShortMessage{}
|
msg := &webapi_proto.ASDeleteShortMessage{}
|
||||||
|
@ -3812,7 +3812,7 @@ func init() {
|
||||||
pack.Msg = "Etcd Reset success"
|
pack.Msg = "Etcd Reset success"
|
||||||
return common.ResponseTag_Ok, nil
|
return common.ResponseTag_Ok, nil
|
||||||
}))
|
}))
|
||||||
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/SinglePlayerAdjust", WebAPIHandlerWrapper(
|
//WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/SinglePlayerAdjust", WebAPIHandlerWrapper(
|
||||||
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
// func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
// pack := &webapi_proto.SASinglePlayerAdjust{}
|
// pack := &webapi_proto.SASinglePlayerAdjust{}
|
||||||
// msg := &webapi_proto.ASSinglePlayerAdjust{}
|
// msg := &webapi_proto.ASSinglePlayerAdjust{}
|
||||||
|
@ -3858,7 +3858,7 @@ func init() {
|
||||||
// return common.ResponseTag_Ok, pack
|
// return common.ResponseTag_Ok, pack
|
||||||
// }))
|
// }))
|
||||||
// CreateJYB 创建礼包码
|
// CreateJYB 创建礼包码
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/CreateJYB", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/CreateJYB", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SACreateJYB{}
|
pack := &webapi_proto.SACreateJYB{}
|
||||||
msg := &webapi_proto.ASCreateJYB{}
|
msg := &webapi_proto.ASCreateJYB{}
|
||||||
|
@ -3926,7 +3926,7 @@ func init() {
|
||||||
}), "webCreateJybInfo").Start()
|
}), "webCreateJybInfo").Start()
|
||||||
return common.ResponseTag_TransactYield, pack
|
return common.ResponseTag_TransactYield, pack
|
||||||
}))
|
}))
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/UpdateJYB", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/UpdateJYB", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAUpdateJYB{}
|
pack := &webapi_proto.SAUpdateJYB{}
|
||||||
msg := &webapi_proto.ASUpdateJYB{}
|
msg := &webapi_proto.ASUpdateJYB{}
|
||||||
|
@ -4354,7 +4354,7 @@ func init() {
|
||||||
}))
|
}))
|
||||||
|
|
||||||
//======= 资源更新通知 =======
|
//======= 资源更新通知 =======
|
||||||
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/mongo.games.com/game/resource", WebAPIHandlerWrapper(
|
WebAPIHandlerMgrSingleton.RegisteWebAPIHandler("/api/game/resource", WebAPIHandlerWrapper(
|
||||||
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
func(tNode *transact.TransNode, params []byte) (int, proto.Message) {
|
||||||
pack := &webapi_proto.SAResource{}
|
pack := &webapi_proto.SAResource{}
|
||||||
msg := &webapi_proto.ASResource{}
|
msg := &webapi_proto.ASResource{}
|
||||||
|
|
|
@ -2,18 +2,19 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"mongo.games.com/game/protocol/shop"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"mongo.games.com/goserver/core/logger"
|
||||||
|
"mongo.games.com/goserver/core/module"
|
||||||
|
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
"mongo.games.com/game/model"
|
"mongo.games.com/game/model"
|
||||||
hall_proto "mongo.games.com/game/protocol/gamehall"
|
hall_proto "mongo.games.com/game/protocol/gamehall"
|
||||||
player_proto "mongo.games.com/game/protocol/player"
|
player_proto "mongo.games.com/game/protocol/player"
|
||||||
|
"mongo.games.com/game/protocol/shop"
|
||||||
webapi_proto "mongo.games.com/game/protocol/webapi"
|
webapi_proto "mongo.games.com/game/protocol/webapi"
|
||||||
"mongo.games.com/game/protocol/welfare"
|
"mongo.games.com/game/protocol/welfare"
|
||||||
"mongo.games.com/game/srvdata"
|
"mongo.games.com/game/srvdata"
|
||||||
"mongo.games.com/goserver/core/logger"
|
|
||||||
"mongo.games.com/goserver/core/module"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -23,6 +24,7 @@ const (
|
||||||
OpFirstPay = 3
|
OpFirstPay = 3
|
||||||
OpContinuousPay = 4
|
OpContinuousPay = 4
|
||||||
OpPhoneLottery = 5
|
OpPhoneLottery = 5
|
||||||
|
OpCollect = 6
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -36,51 +38,64 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
var WelfareMgrSington = &WelfareMgr{
|
var WelfareMgrSington = &WelfareMgr{
|
||||||
Sign7: make(map[string]*webapi_proto.Welfare7SignDateList),
|
Activity: make(map[string]*ActivityInfos),
|
||||||
Turnplate: make(map[string]*webapi_proto.WelfareTurnplateDateList),
|
}
|
||||||
BlindBox: make(map[string]*webapi_proto.WelfareBlindBoxDataList),
|
|
||||||
BlindBoxCycle: make(map[string]int32),
|
type ActivityInfos struct {
|
||||||
FirstPay: make(map[string]*webapi_proto.WelfareFirstPayDataList),
|
*webapi_proto.Welfare7SignDateList
|
||||||
FirstPayCycle: make(map[string]int32),
|
*webapi_proto.WelfareTurnplateDateList
|
||||||
ContinuousPay: make(map[string]*webapi_proto.WelfareContinuousPayDataList),
|
*webapi_proto.WelfareBlindBoxDataList
|
||||||
ContinuousPayCycle: make(map[string]int32),
|
*webapi_proto.WelfareFirstPayDataList
|
||||||
PhoneLotteryStatus: make(map[string]*webapi_proto.WelfarePhoneLotteryStatus),
|
*webapi_proto.WelfareContinuousPayDataList
|
||||||
|
*webapi_proto.WelfarePhoneLotteryStatus
|
||||||
|
*webapi_proto.WelfareCollectConfig
|
||||||
|
BlindBoxCycle int32
|
||||||
|
FirstPayCycle int32
|
||||||
|
ContinuousPayCycle int32
|
||||||
}
|
}
|
||||||
|
|
||||||
type WelfareMgr struct {
|
type WelfareMgr struct {
|
||||||
BaseClockSinker
|
BaseClockSinker
|
||||||
Sign7 map[string]*webapi_proto.Welfare7SignDateList
|
Activity map[string]*ActivityInfos
|
||||||
Turnplate map[string]*webapi_proto.WelfareTurnplateDateList
|
}
|
||||||
BlindBox map[string]*webapi_proto.WelfareBlindBoxDataList
|
|
||||||
BlindBoxCycle map[string]int32
|
func (this *WelfareMgr) Init() {
|
||||||
FirstPay map[string]*webapi_proto.WelfareFirstPayDataList
|
EtcdMgrSington.InitSign7()
|
||||||
FirstPayCycle map[string]int32
|
EtcdMgrSington.InitTurnplate()
|
||||||
ContinuousPay map[string]*webapi_proto.WelfareContinuousPayDataList
|
EtcdMgrSington.InitBlindBox()
|
||||||
ContinuousPayCycle map[string]int32
|
EtcdMgrSington.InitFirstPay()
|
||||||
PhoneLotteryStatus map[string]*webapi_proto.WelfarePhoneLotteryStatus
|
EtcdMgrSington.InitContinuousPay()
|
||||||
|
EtcdMgrSington.InitPhoneLottery()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) ModuleName() string {
|
func (this *WelfareMgr) ModuleName() string {
|
||||||
return "WelfareMgr"
|
return "WelfareMgr"
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置 rnums 救济金领取次数
|
func (this *WelfareMgr) getConfig(plt string) *ActivityInfos {
|
||||||
func (this *WelfareMgr) SetWelfData(p *Player, rnums int32) {
|
info, ok := this.Activity[plt]
|
||||||
// this.MonitorWelfData(p)
|
if !ok {
|
||||||
if rnums > 0 {
|
info = new(ActivityInfos)
|
||||||
p.WelfData.ReliefFundTimes += rnums
|
this.Activity[plt] = info
|
||||||
|
}
|
||||||
|
return info
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetWelfData 设置救济金领取次数
|
||||||
|
func (this *WelfareMgr) SetWelfData(p *Player, n int32) {
|
||||||
|
if n > 0 {
|
||||||
|
p.WelfData.ReliefFundTimes += n
|
||||||
}
|
}
|
||||||
p.dirty = true
|
p.dirty = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetReliefFund 获取救济金
|
||||||
func (this *WelfareMgr) GetReliefFund(p *Player, isVideo bool) {
|
func (this *WelfareMgr) GetReliefFund(p *Player, isVideo bool) {
|
||||||
sdata := srvdata.PBDB_GameSubsidyMgr.GetData(GameSubsidyid)
|
sdata := srvdata.PBDB_GameSubsidyMgr.GetData(GameSubsidyid)
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCGetReliefFund{
|
pack := &welfare.SCGetReliefFund{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
if sdata != nil {
|
if sdata != nil {
|
||||||
|
|
||||||
if p.WelfData.ReliefFundTimes >= sdata.Times {
|
if p.WelfData.ReliefFundTimes >= sdata.Times {
|
||||||
pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
||||||
|
|
||||||
|
@ -141,137 +156,147 @@ func (this *WelfareMgr) GetReliefFund(p *Player, isVideo bool) {
|
||||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETRELIEFFUND), pack)
|
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETRELIEFFUND), pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) Init() {
|
|
||||||
if !model.GameParamData.UseEtcd {
|
|
||||||
// 后台说现在没有不走ETCD情况~
|
|
||||||
} else {
|
|
||||||
|
|
||||||
EtcdMgrSington.InitSign7()
|
|
||||||
|
|
||||||
EtcdMgrSington.InitTurnplate()
|
|
||||||
|
|
||||||
EtcdMgrSington.InitBlindBox()
|
|
||||||
|
|
||||||
EtcdMgrSington.InitFirstPay()
|
|
||||||
|
|
||||||
EtcdMgrSington.InitContinuousPay()
|
|
||||||
|
|
||||||
EtcdMgrSington.InitPhoneLottery()
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *WelfareMgr) UpdateSign7(cfg *webapi_proto.Welfare7SignDateList) {
|
func (this *WelfareMgr) UpdateSign7(cfg *webapi_proto.Welfare7SignDateList) {
|
||||||
this.Sign7[cfg.Platform] = cfg
|
this.getConfig(cfg.Platform).Welfare7SignDateList = cfg
|
||||||
}
|
}
|
||||||
func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateList) {
|
func (this *WelfareMgr) UpdateTurnplate(cfg *webapi_proto.WelfareTurnplateDateList) {
|
||||||
s := int32(0)
|
s := int32(0)
|
||||||
if turnplate := this.Turnplate[cfg.Platform]; turnplate != nil {
|
info := this.getConfig(cfg.Platform)
|
||||||
s = this.Turnplate[cfg.Platform].Switch
|
if info.WelfareTurnplateDateList != nil {
|
||||||
|
s = info.WelfareTurnplateDateList.Switch
|
||||||
}
|
}
|
||||||
this.Turnplate[cfg.Platform] = cfg
|
info.WelfareTurnplateDateList = cfg
|
||||||
if s != 0 && s != cfg.Switch { // 打开关闭要广播给客户端
|
|
||||||
this.WelfareClues(nil, cfg.Platform, OpTurnplate)
|
// 打开关闭要广播给客户端
|
||||||
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpTurnplate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList) {
|
func (this *WelfareMgr) UpdateBlindBox(cfg *webapi_proto.WelfareBlindBoxDataList) {
|
||||||
s := int32(0)
|
s := int32(0)
|
||||||
if blindBox := this.BlindBox[cfg.Platform]; blindBox != nil {
|
info := this.getConfig(cfg.Platform)
|
||||||
s = this.BlindBox[cfg.Platform].Switch
|
if info.WelfareBlindBoxDataList != nil {
|
||||||
|
s = info.WelfareBlindBoxDataList.Switch
|
||||||
}
|
}
|
||||||
this.BlindBox[cfg.Platform] = cfg
|
info.WelfareBlindBoxDataList = cfg
|
||||||
if cfg.Cycle == WelfareOpen {
|
if cfg.Cycle == WelfareOpen {
|
||||||
this.BlindBoxCycle[cfg.Platform] = 1
|
info.BlindBoxCycle = 1
|
||||||
}
|
}
|
||||||
if s != 0 && s != cfg.Switch { // 打开关闭要广播给客户端
|
// 打开关闭要广播给客户端
|
||||||
this.WelfareClues(nil, cfg.Platform, OpBlindBox)
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpBlindBox)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList) {
|
func (this *WelfareMgr) UpdateFirstPay(cfg *webapi_proto.WelfareFirstPayDataList) {
|
||||||
s := int32(0)
|
s := int32(0)
|
||||||
if firstPay := this.FirstPay[cfg.Platform]; firstPay != nil {
|
info := this.getConfig(cfg.Platform)
|
||||||
s = this.FirstPay[cfg.Platform].Switch
|
if info.WelfareFirstPayDataList != nil {
|
||||||
|
s = info.WelfareFirstPayDataList.Switch
|
||||||
}
|
}
|
||||||
this.FirstPay[cfg.Platform] = cfg
|
info.WelfareFirstPayDataList = cfg
|
||||||
if cfg.Cycle == WelfareOpen {
|
if cfg.Cycle == WelfareOpen {
|
||||||
this.FirstPayCycle[cfg.Platform] = 1
|
info.FirstPayCycle = 1
|
||||||
}
|
}
|
||||||
if s != 0 && s != cfg.Switch { // 打开关闭要广播给客户端
|
// 打开关闭要广播给客户端
|
||||||
this.WelfareClues(nil, cfg.Platform, OpFirstPay)
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpFirstPay)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousPayDataList) {
|
func (this *WelfareMgr) UpdateContinuousPay(cfg *webapi_proto.WelfareContinuousPayDataList) {
|
||||||
s := int32(0)
|
s := int32(0)
|
||||||
if continuousPay := this.ContinuousPay[cfg.Platform]; continuousPay != nil {
|
info := this.getConfig(cfg.Platform)
|
||||||
s = this.ContinuousPay[cfg.Platform].Switch
|
if info.WelfareContinuousPayDataList != nil {
|
||||||
|
s = info.WelfareContinuousPayDataList.Switch
|
||||||
}
|
}
|
||||||
this.ContinuousPay[cfg.Platform] = cfg
|
info.WelfareContinuousPayDataList = cfg
|
||||||
if cfg.Cycle == WelfareOpen {
|
if cfg.Cycle == WelfareOpen {
|
||||||
this.ContinuousPayCycle[cfg.Platform] = 1
|
info.ContinuousPayCycle = 1
|
||||||
}
|
}
|
||||||
if s != 0 && s != cfg.Switch { // 打开关闭要广播给客户端
|
// 打开关闭要广播给客户端
|
||||||
this.WelfareClues(nil, cfg.Platform, OpContinuousPay)
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpContinuousPay)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneLotteryStatus) {
|
func (this *WelfareMgr) UpdatePhoneLotteryStatus(cfg *webapi_proto.WelfarePhoneLotteryStatus) {
|
||||||
this.PhoneLotteryStatus[cfg.Platform] = cfg
|
|
||||||
s := int32(0)
|
s := int32(0)
|
||||||
if phoneLotteryStatus := this.PhoneLotteryStatus[cfg.Platform]; phoneLotteryStatus != nil {
|
info := this.getConfig(cfg.Platform)
|
||||||
s = this.PhoneLotteryStatus[cfg.Platform].Switch
|
if info.WelfarePhoneLotteryStatus != nil {
|
||||||
|
s = info.WelfarePhoneLotteryStatus.Switch
|
||||||
}
|
}
|
||||||
this.PhoneLotteryStatus[cfg.Platform] = cfg
|
info.WelfarePhoneLotteryStatus = cfg
|
||||||
if s != 0 && s != cfg.Switch { // 打开关闭要广播给客户端
|
// 打开关闭要广播给客户端
|
||||||
this.WelfareClues(nil, cfg.Platform, OpPhoneLottery)
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpPhoneLottery)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) GetPhoneLotteryStatus(platform string) int32 {
|
func (this *WelfareMgr) GetPhoneLotteryStatus(platform string) int32 {
|
||||||
if this.PhoneLotteryStatus[platform] != nil {
|
info := this.getConfig(platform)
|
||||||
return this.PhoneLotteryStatus[platform].GetSwitch()
|
if info.WelfarePhoneLotteryStatus != nil {
|
||||||
|
return info.WelfarePhoneLotteryStatus.Switch
|
||||||
}
|
}
|
||||||
//测试代码
|
|
||||||
return WelfareClose
|
return WelfareClose
|
||||||
}
|
}
|
||||||
func (this *WelfareMgr) OnDayChanged(player *Player) error {
|
|
||||||
if player.WelfData != nil {
|
|
||||||
player.WelfData.ReliefFundTimes = 0
|
|
||||||
blindBox := this.BlindBox[player.Platform]
|
|
||||||
//continuousPay := this.ContinuousPay[player.Platform]
|
|
||||||
if blindBox != nil { // 关闭循环重置为-1
|
|
||||||
if blindBox.Cycle == WelfareClose && player.WelfData.BlindBoxId != 0 {
|
|
||||||
player.WelfData.BlindBoxId = -1
|
|
||||||
} else { // 循环
|
|
||||||
player.WelfData.BlindBoxId = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//this.WelfareShowRed(player) //
|
|
||||||
if !this.Welfareturnplate(player, 0) {
|
|
||||||
player.SendShowRed(hall_proto.ShowRedCode_Welfare, 0, 1) // 0 轮盘红点
|
|
||||||
}
|
|
||||||
|
|
||||||
// 同步救济金次数
|
func (this *WelfareMgr) UpdateCollectConfig(cfg *webapi_proto.WelfareCollectConfig) {
|
||||||
pack := &welfare.SCGetReliefFund{
|
s := int32(0)
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Sucess,
|
info := this.getConfig(cfg.Platform)
|
||||||
Times: player.WelfData.ReliefFundTimes,
|
if info.WelfareCollectConfig != nil {
|
||||||
Coin: -1, // 更新剩余次数
|
s = info.WelfareCollectConfig.Switch
|
||||||
}
|
|
||||||
player.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETRELIEFFUND), pack)
|
|
||||||
logger.Logger.Tracef("OnDayChanged SCGetReliefFund snid: %v pack: %v", player.SnId, pack)
|
|
||||||
}
|
}
|
||||||
|
info.WelfareCollectConfig = cfg
|
||||||
|
// 打开关闭要广播给客户端
|
||||||
|
if s != 0 && s != cfg.Switch {
|
||||||
|
this.WelfareSwitch(nil, cfg.Platform, OpCollect)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *WelfareMgr) GetCollectSwitch(platform string) int32 {
|
||||||
|
info := this.getConfig(platform)
|
||||||
|
if info.WelfareCollectConfig != nil {
|
||||||
|
return info.WelfareCollectConfig.Switch
|
||||||
|
}
|
||||||
|
return WelfareClose
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *WelfareMgr) OnDayChanged(player *Player) error {
|
||||||
|
if player.WelfData == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
player.WelfData.ReliefFundTimes = 0
|
||||||
|
blindBox := this.getConfig(player.Platform).WelfareBlindBoxDataList
|
||||||
|
if blindBox != nil { // 关闭循环重置为-1
|
||||||
|
if blindBox.Cycle == WelfareClose && player.WelfData.BlindBoxId != 0 {
|
||||||
|
player.WelfData.BlindBoxId = -1
|
||||||
|
} else { // 循环
|
||||||
|
player.WelfData.BlindBoxId = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !this.Welfareturnplate(player, 0) {
|
||||||
|
player.SendShowRed(hall_proto.ShowRedCode_Welfare, 0, 1) // 0 轮盘红点
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同步救济金次数
|
||||||
|
pack := &welfare.SCGetReliefFund{
|
||||||
|
OpRetCode: welfare.OpResultCode_OPRC_Sucess,
|
||||||
|
Times: player.WelfData.ReliefFundTimes,
|
||||||
|
Coin: -1, // 更新剩余次数
|
||||||
|
}
|
||||||
|
player.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETRELIEFFUND), pack)
|
||||||
|
logger.Logger.Tracef("OnDayChanged SCGetReliefFund snid: %v pack: %v", player.SnId, pack)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) MonitorWelfData(player *Player) {
|
func (this *WelfareMgr) MonitorWelfData(player *Player) {
|
||||||
|
|
||||||
if player.WelfData == nil {
|
if player.WelfData == nil {
|
||||||
player.WelfData = &model.WelfareData{
|
player.WelfData = model.NewWelfareData()
|
||||||
Sign7: &model.NewSignData{},
|
|
||||||
VIPBag: make(map[int32]map[int32]int32),
|
|
||||||
}
|
|
||||||
} else if player.WelfData.Sign7 == nil {
|
} else if player.WelfData.Sign7 == nil {
|
||||||
player.WelfData.Sign7 = &model.NewSignData{}
|
player.WelfData.Sign7 = &model.NewSignData{}
|
||||||
} else if player.WelfData.VIPBag == nil {
|
} else if player.WelfData.VIPBag == nil {
|
||||||
|
@ -279,13 +304,14 @@ func (this *WelfareMgr) MonitorWelfData(player *Player) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTurnplate 获取转盘奖励
|
||||||
func (this *WelfareMgr) GetTurnplate(p *Player) {
|
func (this *WelfareMgr) GetTurnplate(p *Player) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCGetTurnplate{
|
pack := &welfare.SCGetTurnplate{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
turnplate := this.Turnplate[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
sign7 := this.Sign7[p.Platform]
|
turnplate := info.WelfareTurnplateDateList
|
||||||
|
sign7 := info.Welfare7SignDateList
|
||||||
if turnplate != nil && sign7 != nil {
|
if turnplate != nil && sign7 != nil {
|
||||||
if turnplate.Switch != WelfareOpen {
|
if turnplate.Switch != WelfareOpen {
|
||||||
logger.Logger.Tracef("GetTurnplate Switch err p.SnId = %v %v", p.SnId, turnplate.Switch)
|
logger.Logger.Tracef("GetTurnplate Switch err p.SnId = %v %v", p.SnId, turnplate.Switch)
|
||||||
|
@ -377,6 +403,7 @@ func (this *WelfareMgr) GetTurnplate(p *Player) {
|
||||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETTURNPLATE), pack)
|
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETTURNPLATE), pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTurnplteVideo 转盘视频奖励
|
||||||
func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
||||||
pack := &welfare.SCGetTurnplate{
|
pack := &welfare.SCGetTurnplate{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
|
@ -388,8 +415,9 @@ func (this *WelfareMgr) GetTurnplteVideo(p *Player) {
|
||||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETTURNPLATE), pack)
|
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETTURNPLATE), pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
turn := this.Turnplate[p.Platform] // 转盘
|
info := this.getConfig(p.Platform)
|
||||||
sign7 := this.Sign7[p.Platform] // 签到
|
turn := info.WelfareTurnplateDateList // 转盘
|
||||||
|
sign7 := info.Welfare7SignDateList // 签到
|
||||||
if turn == nil || sign7 == nil {
|
if turn == nil || sign7 == nil {
|
||||||
send()
|
send()
|
||||||
return
|
return
|
||||||
|
@ -557,13 +585,14 @@ func DrawWelfareDate(dates []*webapi_proto.WelfareDate, p *Player, gainWay int32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetAddupSign 累计签到
|
||||||
func (this *WelfareMgr) GetAddupSign(p *Player, addupday int32) {
|
func (this *WelfareMgr) GetAddupSign(p *Player, addupday int32) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCGetAddupSign{
|
pack := &welfare.SCGetAddupSign{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
turnplate := this.Turnplate[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
sign7 := this.Sign7[p.Platform]
|
turnplate := info.WelfareTurnplateDateList
|
||||||
|
sign7 := info.Welfare7SignDateList
|
||||||
if turnplate != nil && sign7 != nil {
|
if turnplate != nil && sign7 != nil {
|
||||||
if turnplate.Switch != WelfareOpen {
|
if turnplate.Switch != WelfareOpen {
|
||||||
logger.Logger.Tracef("Get7Sign Switch err p.SnId = %v %v", p.SnId, turnplate.Switch)
|
logger.Logger.Tracef("Get7Sign Switch err p.SnId = %v %v", p.SnId, turnplate.Switch)
|
||||||
|
@ -622,13 +651,14 @@ func (this *WelfareMgr) GetAddupSign(p *Player, addupday int32) {
|
||||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETADDUPSIGN), pack)
|
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_GETADDUPSIGN), pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WelfaredInfo 转盘签到活动信息
|
||||||
func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCWelfaredInfo{}
|
pack := &welfare.SCWelfaredInfo{}
|
||||||
diff := 0
|
diff := 0
|
||||||
ts := time.Now().Unix()
|
ts := time.Now().Unix()
|
||||||
turnplate := this.Turnplate[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
sign7 := this.Sign7[p.Platform]
|
turnplate := info.WelfareTurnplateDateList
|
||||||
|
sign7 := info.Welfare7SignDateList
|
||||||
if turnplate != nil && sign7 != nil {
|
if turnplate != nil && sign7 != nil {
|
||||||
pack.Switch = turnplate.Switch
|
pack.Switch = turnplate.Switch
|
||||||
if turnplate.Switch != WelfareClose {
|
if turnplate.Switch != WelfareClose {
|
||||||
|
@ -656,7 +686,6 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range sign7.List {
|
for _, v := range sign7.List {
|
||||||
|
|
||||||
data := &welfare.Welfare7SignDate{
|
data := &welfare.Welfare7SignDate{
|
||||||
Day: v.Day,
|
Day: v.Day,
|
||||||
}
|
}
|
||||||
|
@ -699,11 +728,14 @@ func (this *WelfareMgr) WelfaredInfo(p *Player) {
|
||||||
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_WELFAREINFO), pack)
|
p.SendToClient(int(welfare.SPacketID_PACKET_SC_WELF_WELFAREINFO), pack)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) WelfareClues(p *Player, platform string, op int) {
|
// WelfareSwitch 通知活动开关状态
|
||||||
|
func (this *WelfareMgr) WelfareSwitch(p *Player, platform string, op int) {
|
||||||
pack := &player_proto.SCEasyWelfaredInfo{}
|
pack := &player_proto.SCEasyWelfaredInfo{}
|
||||||
// 0转盘1盲盒2首冲3连续充值
|
// 0转盘1盲盒2首冲3连续充值
|
||||||
turnplate := this.Turnplate[platform]
|
info := this.getConfig(platform)
|
||||||
|
|
||||||
|
// 转盘
|
||||||
|
turnplate := info.WelfareTurnplateDateList
|
||||||
if turnplate != nil {
|
if turnplate != nil {
|
||||||
if op == OpAll || op == OpTurnplate {
|
if op == OpAll || op == OpTurnplate {
|
||||||
if turnplate.Switch == WelfareOpen && p != nil && this.Welfareturnplate(p, 1) { // 没有关闭且所有奖励已经领取
|
if turnplate.Switch == WelfareOpen && p != nil && this.Welfareturnplate(p, 1) { // 没有关闭且所有奖励已经领取
|
||||||
|
@ -717,8 +749,8 @@ func (this *WelfareMgr) WelfareClues(p *Player, platform string, op int) {
|
||||||
} else {
|
} else {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
||||||
}
|
}
|
||||||
|
// 盲盒
|
||||||
blindBox := this.BlindBox[platform]
|
blindBox := info.WelfareBlindBoxDataList
|
||||||
if blindBox != nil {
|
if blindBox != nil {
|
||||||
if op == OpAll || op == OpBlindBox {
|
if op == OpAll || op == OpBlindBox {
|
||||||
if blindBox.Switch == WelfareOpen && blindBox.Cycle == WelfareClose && p != nil && p.WelfData.BlindBoxId != 0 { // 没有关闭且所有奖励已经领取
|
if blindBox.Switch == WelfareOpen && blindBox.Cycle == WelfareClose && p != nil && p.WelfData.BlindBoxId != 0 { // 没有关闭且所有奖励已经领取
|
||||||
|
@ -732,8 +764,8 @@ func (this *WelfareMgr) WelfareClues(p *Player, platform string, op int) {
|
||||||
} else {
|
} else {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
||||||
}
|
}
|
||||||
|
// 首充
|
||||||
firstPay := this.FirstPay[platform]
|
firstPay := info.WelfareFirstPayDataList
|
||||||
if firstPay != nil {
|
if firstPay != nil {
|
||||||
if op == OpAll || op == OpFirstPay {
|
if op == OpAll || op == OpFirstPay {
|
||||||
ln := len(firstPay.List)
|
ln := len(firstPay.List)
|
||||||
|
@ -749,8 +781,8 @@ func (this *WelfareMgr) WelfareClues(p *Player, platform string, op int) {
|
||||||
} else {
|
} else {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
||||||
}
|
}
|
||||||
|
// 连充
|
||||||
continuousPay := this.ContinuousPay[platform]
|
continuousPay := info.WelfareContinuousPayDataList
|
||||||
if continuousPay != nil {
|
if continuousPay != nil {
|
||||||
if op == OpAll || op == OpContinuousPay {
|
if op == OpAll || op == OpContinuousPay {
|
||||||
ln := len(continuousPay.List)
|
ln := len(continuousPay.List)
|
||||||
|
@ -766,26 +798,36 @@ func (this *WelfareMgr) WelfareClues(p *Player, platform string, op int) {
|
||||||
} else {
|
} else {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose) // 配置nil就是关闭
|
||||||
}
|
}
|
||||||
//抽手机活动开关
|
// 抽手机活动开关
|
||||||
if this.PhoneLotteryStatus[platform] != nil {
|
phoneConfig := info.WelfarePhoneLotteryStatus
|
||||||
phoneLotterySwitch := this.PhoneLotteryStatus[platform].Switch
|
if phoneConfig != nil {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, phoneLotterySwitch) //抽手机活动开关
|
pack.WelfareSwitch = append(pack.WelfareSwitch, phoneConfig.Switch) //抽手机活动开关
|
||||||
} else {
|
} else {
|
||||||
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose)
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose)
|
||||||
}
|
}
|
||||||
|
// 集卡活动
|
||||||
|
collectConfig := info.WelfareCollectConfig
|
||||||
|
if collectConfig != nil {
|
||||||
|
pack.WelfareSwitch = append(pack.WelfareSwitch, collectConfig.Switch) //集卡活动开关
|
||||||
|
} else {
|
||||||
|
pack.WelfareSwitch = append(pack.WelfareSwitch, WelfareClose)
|
||||||
|
}
|
||||||
|
|
||||||
if p != nil {
|
if p != nil {
|
||||||
logger.Logger.Tracef("WelfareClues snid: %v pack: %v", p.SnId, pack)
|
logger.Logger.Tracef("WelfareSwitch snid: %v pack: %v", p.SnId, pack)
|
||||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack)
|
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack)
|
||||||
} else {
|
} else {
|
||||||
logger.Logger.Tracef("WelfareClues to Platform pack: %v", pack)
|
logger.Logger.Tracef("WelfareSwitch to Platform pack: %v", pack)
|
||||||
PlayerMgrSington.BroadcastMessageToPlatform(platform, int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack)
|
PlayerMgrSington.BroadcastMessageToPlatform(platform, int(player_proto.PlayerPacketID_PACKET_SC_SWELFAREINFO), pack)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Welfareturnplate 转盘红点
|
||||||
func (this *WelfareMgr) Welfareturnplate(p *Player, op int32) bool { // 0 红点提示 1全部领取
|
func (this *WelfareMgr) Welfareturnplate(p *Player, op int32) bool { // 0 红点提示 1全部领取
|
||||||
var isShow bool
|
var isShow bool
|
||||||
turnplate := this.Turnplate[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
sign7 := this.Sign7[p.Platform]
|
turnplate := info.WelfareTurnplateDateList
|
||||||
|
sign7 := info.Welfare7SignDateList
|
||||||
if turnplate != nil && sign7 != nil {
|
if turnplate != nil && sign7 != nil {
|
||||||
if turnplate.Switch == WelfareClose {
|
if turnplate.Switch == WelfareClose {
|
||||||
return true
|
return true
|
||||||
|
@ -805,7 +847,6 @@ func (this *WelfareMgr) Welfareturnplate(p *Player, op int32) bool { // 0 红点
|
||||||
if isShow { // 当日已经领取 查看累计奖励是否领取
|
if isShow { // 当日已经领取 查看累计奖励是否领取
|
||||||
var addUpDate []int32
|
var addUpDate []int32
|
||||||
for _, v := range sign7.List {
|
for _, v := range sign7.List {
|
||||||
|
|
||||||
for _, d := range v.AddUpDate { // 累计奖励
|
for _, d := range v.AddUpDate { // 累计奖励
|
||||||
addUpDate = append(addUpDate, d.AddUpDay)
|
addUpDate = append(addUpDate, d.AddUpDay)
|
||||||
}
|
}
|
||||||
|
@ -838,20 +879,19 @@ func (this *WelfareMgr) WelfareShowRed(p *Player) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.MonitorWelfData(p) // 登录检测
|
this.MonitorWelfData(p) // 登录检测
|
||||||
this.WelfareClues(p, p.Platform, OpAll)
|
this.WelfareSwitch(p, p.Platform, OpAll)
|
||||||
|
|
||||||
if !this.Welfareturnplate(p, 0) {
|
if !this.Welfareturnplate(p, 0) {
|
||||||
p.SendShowRed(hall_proto.ShowRedCode_Welfare, 0, 1) // 0 轮盘红点
|
p.SendShowRed(hall_proto.ShowRedCode_Welfare, 0, 1) // 0 轮盘红点
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) {
|
func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCBlindBoxInfo{
|
pack := &welfare.SCBlindBoxInfo{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
blindBox := this.BlindBox[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
|
blindBox := info.WelfareBlindBoxDataList
|
||||||
if blindBox != nil {
|
if blindBox != nil {
|
||||||
if blindBox.Switch != WelfareOpen {
|
if blindBox.Switch != WelfareOpen {
|
||||||
logger.Logger.Tracef("BlindBoxInfo Switch err p.SnId = %v %v", p.SnId, blindBox.Switch)
|
logger.Logger.Tracef("BlindBoxInfo Switch err p.SnId = %v %v", p.SnId, blindBox.Switch)
|
||||||
|
@ -867,7 +907,7 @@ func (this *WelfareMgr) BlindBoxInfo(p *Player, bid int32) {
|
||||||
|
|
||||||
pack.MinId = blindBox.MinId
|
pack.MinId = blindBox.MinId
|
||||||
pack.Draw = 1
|
pack.Draw = 1
|
||||||
cyc := this.BlindBoxCycle[p.Platform]
|
cyc := info.BlindBoxCycle
|
||||||
if p.WelfData.BlindBoxId == -1 {
|
if p.WelfData.BlindBoxId == -1 {
|
||||||
if cyc == 1 || blindBox.Cycle == WelfareOpen {
|
if cyc == 1 || blindBox.Cycle == WelfareOpen {
|
||||||
p.WelfData.BlindBoxId = 0
|
p.WelfData.BlindBoxId = 0
|
||||||
|
@ -926,7 +966,7 @@ func (this *WelfareMgr) BuyBlindBox(p *Player, buyid, ConfigPayId int32) {
|
||||||
pack := &shop.SCPayInfo{
|
pack := &shop.SCPayInfo{
|
||||||
RetCode: shop.OpResultCode_OPRC_Error,
|
RetCode: shop.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
blindBox := this.BlindBox[p.Platform]
|
blindBox := this.getConfig(p.Platform).WelfareBlindBoxDataList
|
||||||
if blindBox == nil {
|
if blindBox == nil {
|
||||||
logger.Logger.Tracef("BuyBlindBox blindBox==nil snid: %v pack: %v", p.SnId, pack)
|
logger.Logger.Tracef("BuyBlindBox blindBox==nil snid: %v pack: %v", p.SnId, pack)
|
||||||
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
||||||
|
@ -1025,11 +1065,11 @@ func (this *WelfareMgr) BuyBlindBox(p *Player, buyid, ConfigPayId int32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) FirstPayInfo(p *Player) {
|
func (this *WelfareMgr) FirstPayInfo(p *Player) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
pack := &welfare.SCWelfareFirstPayData{
|
pack := &welfare.SCWelfareFirstPayData{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
firstPay := this.FirstPay[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
|
firstPay := info.WelfareFirstPayDataList
|
||||||
if firstPay != nil {
|
if firstPay != nil {
|
||||||
pack.Switch = firstPay.Switch
|
pack.Switch = firstPay.Switch
|
||||||
if firstPay.Switch != WelfareClose {
|
if firstPay.Switch != WelfareClose {
|
||||||
|
@ -1051,7 +1091,7 @@ func (this *WelfareMgr) FirstPayInfo(p *Player) {
|
||||||
}
|
}
|
||||||
|
|
||||||
max := firstPay.List[ln-1].Day // 正序
|
max := firstPay.List[ln-1].Day // 正序
|
||||||
cyc := this.FirstPayCycle[p.Platform]
|
cyc := info.FirstPayCycle
|
||||||
if pack.Draw == 2 { // 当天未领取判断
|
if pack.Draw == 2 { // 当天未领取判断
|
||||||
if day >= max {
|
if day >= max {
|
||||||
if firstPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完就发最后一天
|
if firstPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完就发最后一天
|
||||||
|
@ -1112,7 +1152,8 @@ func (this *WelfareMgr) BuyFirstPay(p *Player, ConfigPayId int32) {
|
||||||
pack := &shop.SCPayInfo{
|
pack := &shop.SCPayInfo{
|
||||||
RetCode: shop.OpResultCode_OPRC_Error,
|
RetCode: shop.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
firstPay := this.FirstPay[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
|
firstPay := info.WelfareFirstPayDataList
|
||||||
if firstPay == nil {
|
if firstPay == nil {
|
||||||
logger.Logger.Errorf("BuyFirstPay firstPay == nil snid: %v pack: %v", p.SnId, pack)
|
logger.Logger.Errorf("BuyFirstPay firstPay == nil snid: %v pack: %v", p.SnId, pack)
|
||||||
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
||||||
|
@ -1139,7 +1180,7 @@ func (this *WelfareMgr) BuyFirstPay(p *Player, ConfigPayId int32) {
|
||||||
max := firstPay.List[ln-1].Day // 正序
|
max := firstPay.List[ln-1].Day // 正序
|
||||||
|
|
||||||
if p.WelfData.FirstPayDay >= max {
|
if p.WelfData.FirstPayDay >= max {
|
||||||
cyc := this.FirstPayCycle[p.Platform]
|
cyc := info.FirstPayCycle
|
||||||
if firstPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完
|
if firstPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完
|
||||||
//pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
//pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
||||||
logger.Logger.Tracef("BuyFirstPay Cycle p.WelfData.FirstPayDay max p.SnId = %v %v", p.SnId, firstPay.Cycle, p.WelfData.FirstPayDay, max)
|
logger.Logger.Tracef("BuyFirstPay Cycle p.WelfData.FirstPayDay max p.SnId = %v %v", p.SnId, firstPay.Cycle, p.WelfData.FirstPayDay, max)
|
||||||
|
@ -1236,7 +1277,8 @@ func (this *WelfareMgr) ContinuousPayInfo(p *Player) {
|
||||||
pack := &welfare.SCWelfareContinuousPayData{
|
pack := &welfare.SCWelfareContinuousPayData{
|
||||||
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
OpRetCode: welfare.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
continuousPay := this.ContinuousPay[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
|
continuousPay := info.WelfareContinuousPayDataList
|
||||||
if continuousPay != nil {
|
if continuousPay != nil {
|
||||||
pack.Switch = continuousPay.Switch
|
pack.Switch = continuousPay.Switch
|
||||||
if continuousPay.Switch != WelfareClose {
|
if continuousPay.Switch != WelfareClose {
|
||||||
|
@ -1261,7 +1303,7 @@ func (this *WelfareMgr) ContinuousPayInfo(p *Player) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if pack.Draw == 2 { // 当天未领取判断
|
if pack.Draw == 2 { // 当天未领取判断
|
||||||
cyc := this.ContinuousPayCycle[p.Platform]
|
cyc := info.ContinuousPayCycle
|
||||||
for i, v := range continuousPay.List {
|
for i, v := range continuousPay.List {
|
||||||
if v.Day == day || day == 0 || day >= max {
|
if v.Day == day || day == 0 || day >= max {
|
||||||
if day != 0 { // 为0领取第一个 day不为0代表已经领取到该礼包 需要领取下一个
|
if day != 0 { // 为0领取第一个 day不为0代表已经领取到该礼包 需要领取下一个
|
||||||
|
@ -1316,14 +1358,11 @@ func (this *WelfareMgr) ContinuousPayInfo(p *Player) {
|
||||||
|
|
||||||
// 默认已经成功
|
// 默认已经成功
|
||||||
func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) {
|
func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) {
|
||||||
// this.MonitorWelfData(p)
|
|
||||||
//pack := &welfare.SCWelfareContinuousPay{
|
|
||||||
// OpRetCode: welfare.OpResultCode_OPRC_Error,
|
|
||||||
//}
|
|
||||||
pack := &shop.SCPayInfo{
|
pack := &shop.SCPayInfo{
|
||||||
RetCode: shop.OpResultCode_OPRC_Error,
|
RetCode: shop.OpResultCode_OPRC_Error,
|
||||||
}
|
}
|
||||||
continuousPay := this.ContinuousPay[p.Platform]
|
info := this.getConfig(p.Platform)
|
||||||
|
continuousPay := info.WelfareContinuousPayDataList
|
||||||
if continuousPay == nil {
|
if continuousPay == nil {
|
||||||
logger.Logger.Tracef("BuyContinuousPay continuousPay == nil snid: %v pack: %v", p.SnId, pack)
|
logger.Logger.Tracef("BuyContinuousPay continuousPay == nil snid: %v pack: %v", p.SnId, pack)
|
||||||
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
p.SendToClient(int(shop.SPacketID_PACKET_SCPAYINFO), pack)
|
||||||
|
@ -1352,7 +1391,7 @@ func (this *WelfareMgr) BuyContinuousPay(p *Player, ConfigPayId int32) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.WelfData.ContinuousPayDay >= max {
|
if p.WelfData.ContinuousPayDay >= max {
|
||||||
cyc := this.ContinuousPayCycle[p.Platform]
|
cyc := info.ContinuousPayCycle
|
||||||
if continuousPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完
|
if continuousPay.Cycle != WelfareOpen && cyc != 1 { // 全部领取完
|
||||||
//pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
//pack.OpRetCode = welfare.OpResultCode_OPRC_NoTimes
|
||||||
logger.Logger.Tracef("BuyContinuousPay Cycle p.WelfData.FirstPayDay max p.SnId = %v %v", p.SnId, continuousPay.Cycle, p.WelfData.ContinuousPayDay, max)
|
logger.Logger.Tracef("BuyContinuousPay Cycle p.WelfData.FirstPayDay max p.SnId = %v %v", p.SnId, continuousPay.Cycle, p.WelfData.ContinuousPayDay, max)
|
||||||
|
@ -1450,14 +1489,14 @@ func (this *WelfareMgr) Shutdown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) OnDayTimer() {
|
func (this *WelfareMgr) OnDayTimer() {
|
||||||
//logger.Logger.Tracef("WelfareMgr OnDayTimer")
|
for _, v := range this.Activity {
|
||||||
this.BlindBoxCycle = make(map[string]int32)
|
v.BlindBoxCycle = 0
|
||||||
this.FirstPayCycle = make(map[string]int32)
|
v.FirstPayCycle = 0
|
||||||
this.ContinuousPayCycle = make(map[string]int32)
|
v.ContinuousPayCycle = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *WelfareMgr) InterestClockEvent() int {
|
func (this *WelfareMgr) InterestClockEvent() int {
|
||||||
|
|
||||||
return (1 << CLOCK_EVENT_MAX) - 1
|
return (1 << CLOCK_EVENT_MAX) - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue