From a6e65f236f401692067ecf2863e1461fb7df22e9 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 26 Apr 2024 10:47:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=B0=B1=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constant.go | 1 + public | 2 +- worldsrv/action_login.go | 16 +-- worldsrv/action_server.go | 1 + worldsrv/action_task.go | 10 +- worldsrv/etcdmgr.go | 48 ------- worldsrv/player.go | 167 +--------------------- worldsrv/rebatetask.go | 275 ------------------------------------ worldsrv/taskmgr.go | 6 +- worldsrv/trascate_webapi.go | 20 +-- 10 files changed, 32 insertions(+), 514 deletions(-) delete mode 100644 worldsrv/rebatetask.go diff --git a/common/constant.go b/common/constant.go index f50ae35..4b5b5c3 100644 --- a/common/constant.go +++ b/common/constant.go @@ -719,6 +719,7 @@ const ( TaskActivityTypeWeek = 2 // 每周任务 TaskActivityTypeNovice = 3 // 新手任务 TaskActivityTypeInvite = 4 // 邀请任务 + TaskActivityTypeAchieve = 5 // 成就任务 ) const HeadRange = 3 // 机器人头像id范围 diff --git a/public b/public index e593140..b3c791a 160000 --- a/public +++ b/public @@ -1 +1 @@ -Subproject commit e593140357deb0370e57e09fff1820fa419d4d88 +Subproject commit b3c791a33ee4a8739fca055f43d24009b6c1ef34 diff --git a/worldsrv/action_login.go b/worldsrv/action_login.go index 758c5de..bb29260 100644 --- a/worldsrv/action_login.go +++ b/worldsrv/action_login.go @@ -444,14 +444,14 @@ func (this *CSPlatFormHandler) Process(s *netlib.Session, packetid int, data int ExchangeAlipayMax: proto.Int32(platform.ExchangeAlipayMax), ExchangeMultiple: proto.Int32(platform.ExchangeMultiple), } - rebateTask := RebateInfoMgrSington.rebateTask[p.Platform] - if rebateTask != nil { - scPlatForm.Rebate = &login_proto.RebateCfg{ - RebateSwitch: proto.Bool(rebateTask.RebateSwitch), - ReceiveMode: proto.Int32(int32(rebateTask.ReceiveMode)), - NotGiveOverdue: proto.Int32(int32(rebateTask.NotGiveOverdue)), - } - } + //rebateTask := RebateInfoMgrSington.rebateTask[p.Platform] + //if rebateTask != nil { + // scPlatForm.Rebate = &login_proto.RebateCfg{ + // RebateSwitch: proto.Bool(rebateTask.RebateSwitch), + // ReceiveMode: proto.Int32(int32(rebateTask.ReceiveMode)), + // NotGiveOverdue: proto.Int32(int32(rebateTask.NotGiveOverdue)), + // } + //} if platform.ClubConfig != nil { //俱乐部配置 scPlatForm.Club = &login_proto.ClubCfg{ IsOpenClub: proto.Bool(platform.ClubConfig.IsOpenClub), diff --git a/worldsrv/action_server.go b/worldsrv/action_server.go index 6111cfe..1e63b05 100644 --- a/worldsrv/action_server.go +++ b/worldsrv/action_server.go @@ -553,6 +553,7 @@ func init() { } return nil })) + netlib.RegisterFactory(int(server_proto.SSPacketID_PACKET_GW_JACKPOTCOIN), netlib.PacketFactoryWrapper(func() interface{} { return &server_proto.GWGameJackCoin{} })) diff --git a/worldsrv/action_task.go b/worldsrv/action_task.go index d12fa9e..a078374 100644 --- a/worldsrv/action_task.go +++ b/worldsrv/action_task.go @@ -61,7 +61,7 @@ func IsTaskReward(p *Player, id int32) bool { return true } - case common.TaskActivityTypeNovice, common.TaskActivityTypeInvite: + case common.TaskActivityTypeNovice, common.TaskActivityTypeInvite, common.TaskActivityTypeAchieve: if data.Ts > 0 { return true } @@ -175,11 +175,9 @@ func CSTaskDebugInc(s *netlib.Session, packetId int, data interface{}, sid int64 id := msg.GetId() taskType := int32(-1) - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - if v.Id == id { - taskType = v.TaskType - break - } + d := srvdata.PBDB_TaskMgr.GetData(id) + if d != nil { + taskType = d.TaskType } p.ResetTaskN(taskType) diff --git a/worldsrv/etcdmgr.go b/worldsrv/etcdmgr.go index f34094f..90da4c3 100644 --- a/worldsrv/etcdmgr.go +++ b/worldsrv/etcdmgr.go @@ -184,54 +184,6 @@ func (this *EtcdMgr) InitBlackList() { this.InitAndWatch(initFunc, watchFunc) } -// 初始化返利数据 -func (this *EtcdMgr) InitRebateConfig() { - initFunc := func() int64 { - if model.GameParamData.UseEtcd { - logger.Logger.Info("ETCD 初始化返利数据 拉取数据:", etcd.ETCDKEY_CONFIG_REBATE) - res, err := this.GetValueWithPrefix(etcd.ETCDKEY_CONFIG_REBATE) - if err == nil { - for i := int64(0); i < res.Count; i++ { - var RebateTasks *RebateTask - err = json.Unmarshal(res.Kvs[i].Value, &RebateTasks) - if err == nil { - RebateInfoMgrSington.rebateTask[RebateTasks.Platform] = RebateTasks - } else { - logger.Logger.Errorf("etcd desc WithPrefix(%v) panic:%v", etcd.ETCDKEY_CONFIG_REBATE, err) - } - } - if res.Header != nil { - return res.Header.Revision - } - } else { - logger.Logger.Errorf("etcd get WithPrefix(%v) panic:%v", etcd.ETCDKEY_CONFIG_REBATE, err) - } - } - return -1 - } - - // 监控数据变动 - watchFunc := func(ctx context.Context, revision int64) { - this.GoWatch(ctx, revision, etcd.ETCDKEY_CONFIG_REBATE, func(res clientv3.WatchResponse) error { - for _, ev := range res.Events { - switch ev.Type { - case clientv3.EventTypeDelete: - case clientv3.EventTypePut: - var RebateTasks *RebateTask - err := json.Unmarshal(ev.Kv.Value, &RebateTasks) - if err == nil { - RebateInfoMgrSington.rebateTask[RebateTasks.Platform] = RebateTasks - } else { - logger.Logger.Errorf("etcd desc WithPrefix(%v) panic:%v", etcd.ETCDKEY_CONFIG_REBATE, err) - } - } - } - return nil - }) - } - this.InitAndWatch(initFunc, watchFunc) -} - // 初始化代理数据 func (this *EtcdMgr) InitPromoterConfig() { initFunc := func() int64 { diff --git a/worldsrv/player.go b/worldsrv/player.go index 38d7f67..187361e 100644 --- a/worldsrv/player.go +++ b/worldsrv/player.go @@ -2246,10 +2246,8 @@ func (this *Player) OnDayTimer(login, continuous bool, t int) { // 重置每日任务 if this.WelfData != nil { if this.WelfData.Task != nil { - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - if v.GetActivityType() == common.TaskActivityTypeEveryDay { - this.WelfData.Task[v.GetId()] = &model.TaskData{} - } + for _, v := range srvdata.TaskMgr.Get(common.TaskActivityTypeEveryDay) { + this.WelfData.Task[v.GetId()] = &model.TaskData{} } this.WelfData.Task[common.TaskIDInvitePlayGame] = &model.TaskData{} this.WelfData.Task[common.TaskIDInviteFirstLogin] = &model.TaskData{} @@ -2315,10 +2313,8 @@ func (this *Player) OnWeekTimer() { // 重置周任务 if this.WelfData != nil { if this.WelfData.Task != nil { - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - if v.GetActivityType() == common.TaskActivityTypeWeek { - this.WelfData.Task[v.GetId()] = &model.TaskData{} - } + for _, v := range srvdata.TaskMgr.Get(common.TaskActivityTypeWeek) { + this.WelfData.Task[v.GetId()] = &model.TaskData{} } } } @@ -3541,151 +3537,6 @@ func (this *Player) RedirectByGame(packetid int, rawpack interface{}) bool { return false } -// func (this *Player) GetMatchAr(matchId int32) *model.MatchAchievement { -// if this.MatchAchievement == nil { -// this.MatchAchievement = make(map[int32]*model.MatchAchievement) -// } -// if ar, exist := this.MatchAchievement[matchId]; exist { -// return ar -// } -// ar := &model.MatchAchievement{MatchId: matchId, CreateTs: int32(time.Now().Unix())} -// this.MatchAchievement[matchId] = ar -// return ar -// } -//func (this *Player) InitLayered() { -// logger.Logger.Trace("(this *Player) InitLayered") -// if this.IsRob { -// return -// } -// this.layered = make(map[int]bool) -// task.New(nil, task.CallableWrapper(func(o *basic.Object) interface{} { -// return LogicLevelMgrSington.SendPostBySnIds(this.Platform, []int32{this.SnId}) -// }), task.CompleteNotifyWrapper(func(data interface{}, t task.Task) { -// if data != nil { -// newData := data.([]NewMsg) -// for _, d := range newData { -// cnf := LogicLevelMgrSington.GetConfig(d.Platform) -// if cnf == nil { -// continue -// } -// this.layerlevels = d.Levels -// for _, v := range d.Levels { -// if td, ok := cnf.LogicLevelInfo[int32(v)]; ok { -// if td.StartAct == 1 { -// for _, id := range td.CheckActIds { -// this.layered[int(id)] = true -// } -// } -// } -// } -// } -// } -// //this.ActStateSend2Client() -// }), "SendPostBySnIds").Start() -// //// -// for k, v := range this.layered { -// logger.Logger.Tracef("InitLayered....id=%v %v", k, v) -// } -// -//} - -func (this *Player) ActStateSend2Client() { - logger.Logger.Trace("(this *Player) ActStateSend2Client") - actSwitchCfg := make([]int32, common.ActId_Max) - for i := 0; i < common.ActId_Max; i++ { - isOpen := true - switch i { - //case common.ActId_OnlineReward: - // cfg, ok := ActOnlineRewardMgrSington.Configs[this.Platform] - // if !ok || cfg.StartAct <= 0 { - // isOpen = false - // } - //case common.ActId_GoldTask: - // plateFormConfig := ActGoldTaskMgrSington.GetPlateFormConfig(this.Platform) - // if plateFormConfig == nil || plateFormConfig.StartAct == 0 { - // isOpen = false - // } - //case common.ActId_GoldCome: - // plateFormConfig := ActGoldComeMgrSington.GetPlateFormConfig(this.Platform) - // if plateFormConfig == nil || plateFormConfig.StartAct == 0 { - // isOpen = false - // } - //case common.ActId_LuckyTurntable: - // cfg, ok := ActLuckyTurntableMgrSington.Configs[this.Platform] - // if !ok || cfg == nil || cfg.StartAct <= 0 { - // isOpen = false - // } - //case common.ActId_Yeb: - // cfg, ok := ActYebMgrSington.Configs[this.Platform] - // if !ok || cfg == nil || cfg.StartAct <= 0 { - // isOpen = false - // } - //case common.ActId_Card: - // cfg, ok := ActCardMgrSington.Configs[this.Platform] - // if !ok || cfg == nil || cfg.StartAct <= 0 { - // isOpen = false - // } - case common.ActId_RebateTask: - rebateTask := RebateInfoMgrSington.rebateTask[this.Platform] - if rebateTask != nil && !rebateTask.RebateSwitch { - isOpen = false - } - //case common.ActId_VipLevelBonus: - // config := ActVipMgrSington.GetConfig(this.Platform) - // if config == nil || config.StartAct == 0 { - // isOpen = false - // } - //case common.ActId_Sign: - // config := ActSignMgrSington.GetConfig(this.Platform) - // if config == nil || config.StartAct == 0 { - // isOpen = false - // } - //case common.ActId_Task: - // config := ActTaskMgrSington.GetPlatformConfig(this.Platform) - // if config == nil || config.StartAct == 0 { - // isOpen = false - // } - case common.ExchangeId_Bank: - platform := PlatformMgrSingleton.GetPlatform(this.Platform) - if platform == nil || !platform.IsMarkFlag(int32(BindBackCard)) { - isOpen = false - } - case common.ExchangeId_Alipay: - platform := PlatformMgrSingleton.GetPlatform(this.Platform) - if platform == nil || !platform.IsMarkFlag(int32(BindAlipay)) { - isOpen = false - } - case common.ExchangeId_Wechat: - platform := PlatformMgrSingleton.GetPlatform(this.Platform) - if platform == nil || !platform.IsMarkFlag(int32(BindWeiXin)) { - isOpen = false - } - } - - if !isOpen { - actSwitchCfg[i] = 1 - continue - } - - open, ok := this.layered[i] - if ok && open { - actSwitchCfg[i] = 1 - } - } - pack := &login_proto.SCActSwitchCfg{ - ActSwitchCfg: actSwitchCfg, // 0开 1关 默认开 - } - proto.SetDefaults(pack) - logger.Logger.Trace("ActStateSend2Client: ", this.SnId, pack) - this.SendToClient(int(login_proto.LoginPacketID_PACKET_SC_ACTSWITCHCFG), pack) -} - -func (this *Player) ModifyActSwitch() { - logger.Logger.Trace("====================ModifyActSwitch==================") - - //this.ActStateSend2Client() -} - // SyncPlayerDataToGateSrv 玩家信息同步到网关 func (this *Player) SyncPlayerDataToGateSrv(pd *model.PlayerData) { var buf bytes.Buffer @@ -4608,10 +4459,7 @@ func (this *Player) ResetTaskN(tp int32) { return } - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - if v.GetTaskType() != tp { - continue - } + for _, v := range srvdata.TaskMgr.Get(tp) { data := this.WelfData.Task[v.GetId()] if data != nil { data.N = 0 @@ -4624,10 +4472,7 @@ func (this *Player) ResetTask(tp int32) { return } - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - if v.GetTaskType() != tp { - continue - } + for _, v := range srvdata.TaskMgr.Get(tp) { this.WelfData.Task[v.GetId()] = &model.TaskData{} } } diff --git a/worldsrv/rebatetask.go b/worldsrv/rebatetask.go deleted file mode 100644 index 91bdaf0..0000000 --- a/worldsrv/rebatetask.go +++ /dev/null @@ -1,275 +0,0 @@ -package main - -import ( - "encoding/json" - "mongo.games.com/game/common" - "mongo.games.com/game/model" - "mongo.games.com/game/srvdata" - "mongo.games.com/game/webapi" - "mongo.games.com/goserver/core/logger" - "strconv" -) - -//返利任务 - -type RebateTask struct { - Platform string //平台名称 - RebateSwitch bool //返利开关 - RebateManState int //返利是开启个人返利 0 关闭 1 开启 - ReceiveMode int //领取方式 0实时领取 1次日领取 - NotGiveOverdue int //0不过期 1过期不给 2过期邮件给 - RebateGameCfg map[string]*RebateGameCfg //key为GameDif - RebateGameThirdCfg map[string]*RebateGameThirdCfg //第三方key - Version int //活动版本 后台控制 -} -type RebateGameCfg struct { - BaseCoin [3]int32 //返利基准 - RebateRate [3]int32 //返利比率 万分比 - GameId int32 //游戏id - GameMode int32 //游戏类型 - MaxRebateCoin int64 //最高返利 -} -type RebateGameThirdCfg struct { - BaseCoin [3]int32 //返利基准 - RebateRate [3]int32 //返利比率 - ThirdName string //第三方key - ThirdShowName string //前端显示name - MaxRebateCoin int64 //最高返利 - ThirdId string //三方游戏id -} -type RebateInfo struct { - rebateTask map[string]*RebateTask -} - -var RebateInfoMgrSington = &RebateInfo{ - rebateTask: make(map[string]*RebateTask), -} - -func (this *RebateInfo) Init() { -} -func (this *RebateInfo) Update() { -} -func (this *RebateInfo) Shutdown() { - -} -func (this *RebateInfo) ModuleName() string { - return "RebateTask" -} -func (this *RebateInfo) UpdateRebateDataByApi(platform string, RebateInfo RebateInfos, isThirdName bool) { - rebateTask := this.rebateTask[platform] - if rebateTask == nil { - this.rebateTask[platform] = &RebateTask{} - rebateTask = this.rebateTask[platform] - } - rebateTask.Platform = RebateInfo.Platform - rebateTask.RebateSwitch = RebateInfo.RebateSwitch - rebateTask.Version = RebateInfo.Version - rebateTask.NotGiveOverdue = RebateInfo.NotGiveOverdue - rebateTask.ReceiveMode = RebateInfo.ReceiveMode - rebateTask.RebateManState = RebateInfo.RebateManState - if !isThirdName { - rebateTask.RebateGameCfg = make(map[string]*RebateGameCfg) - for _, v := range RebateInfo.RebateGameCfg { - for _, dfm := range srvdata.PBDB_GameFreeMgr.Datas.Arr { - if dfm.GetGameId() == v.GameId && dfm.GetGameMode() == v.GameMode { - rebateTask.RebateGameCfg[dfm.GetGameDif()] = v - break - } - } - } - } else { - rebateTask.RebateGameThirdCfg = make(map[string]*RebateGameThirdCfg) - for _, v := range RebateInfo.RebateGameThirdCfg { - thirdId := strconv.Itoa(int(ThirdPltGameMappingConfig.FindThirdIdByThird(v.ThirdName))) - rebateTask.RebateGameThirdCfg[thirdId] = v - } - } -} - -// 返利数据初始化 -func (this *RebateInfo) LoadRebateData() { - //构建默认的平台数据 - //this.CreateDefaultPlatform() - //获取平台返利数据 getGameRebateConfig - type ApiResult struct { - Tag int - Msg []RebateInfos - } - if !model.GameParamData.UseEtcd { - rebateBuff, err := webapi.API_GetGameRebateConfig(common.GetAppId()) - if err == nil { - logger.Logger.Trace("API_GetGameRebateConfig:", string(rebateBuff)) - ar := ApiResult{} - err = json.Unmarshal(rebateBuff, &ar) - if err == nil && ar.Tag == 0 { - for _, v := range ar.Msg { - rebateTask := this.rebateTask[v.Platform] - if rebateTask == nil { - this.rebateTask[v.Platform] = &RebateTask{ - Platform: v.Platform, - RebateSwitch: v.RebateSwitch, - ReceiveMode: v.ReceiveMode, - RebateManState: v.RebateManState, - NotGiveOverdue: v.NotGiveOverdue, - Version: v.Version, - } - rebateTask = this.rebateTask[v.Platform] - } - rebateTask.RebateGameCfg = make(map[string]*RebateGameCfg) - rebateTask.RebateGameThirdCfg = make(map[string]*RebateGameThirdCfg) - for _, v := range v.RebateGameCfg { - for _, dfm := range srvdata.PBDB_GameFreeMgr.Datas.Arr { - if dfm.GetGameId() == v.GameId && dfm.GetGameMode() == v.GameMode { - rebateTask.RebateGameCfg[dfm.GetGameDif()] = v - break - } - } - } - for _, v := range v.RebateGameThirdCfg { - thirdId := strconv.Itoa(int(ThirdPltGameMappingConfig.FindThirdIdByThird(v.ThirdName))) - v.ThirdId = thirdId - rebateTask.RebateGameThirdCfg[thirdId] = v - } - } - } else { - logger.Logger.Error("Unmarshal RebateTask data error:", err) - } - } else { - logger.Logger.Error("Get RebateTask data error:", err) - } - } else { - EtcdMgrSington.InitRebateConfig() - } -} - -// /////////////////////////////////////////////////////////////////////// -// 对应客户端 -const ( - //棋牌类 - KaiYuanChessGame = 6 //开元棋牌 - SelfChessGame = 7 //博乐棋牌 - FGChessGame = 11 //FG棋牌 - WWGChessGame = 12 //WWG棋牌 - //电子类 - FGElectronicGame = 4 //FG电子 - WWGElectronicGame = 5 //WWG电子 -) - -// ////////////////////////////////// -// /个人信息 -type TotalInfo struct { - GameTotalNum int32 //游戏总局数 - GameMostPartake string //参与最多游戏名字 - GameMostProfit string //单局最多盈利游戏名字 - CreateRoomNum int32 //创建房间总数 - CreateRoomMost string //创建房间最多游戏名字 - CreateClubNum int32 //创建俱乐部数量 - CreateClubRoomMost string //创建包间最多游戏名字 - TeamNum int32 //团队人数 - AchievementTotal int32 //推广总业绩 - RewardTotal int32 //推广总奖励 -} - -// /手动洗码 -type CodeCoinRecord struct { - GameName string //游戏名称 - GameBetCoin int64 //游戏洗码量 - Rate int32 //比例 - Coin int32 //洗码金额 -} -type CodeCoinTotal struct { - TotalCoin int64 //总计游戏投注 - CodeCoinRecord []*CodeCoinRecord - PageNo int //当前页 - PageSize int //每页数量 - PageNum int //总页数 -} - -// /投注记录 -type BetCoinRecord struct { - Ts int64 //时间戳 - GameName string //游戏名称 - RecordId string //注单号 - BetCoin int64 //投注金额 - ReceivedCoin int64 //已派奖 -} -type BetCoinTotal struct { - BetCoinRecord []*BetCoinRecord - PageNo int //当前页 - PageSize int //每页数量 - PageNum int //总页数 -} - -// /账户明细 -type CoinDetailed struct { - Ts int64 //时间戳 - CoinType int64 //交易类型 - Income int64 //收入 - Disburse int64 //支出 - Coin int64 //金额 -} -type CoinDetailedTotal struct { - RechargeCoin int64 //充值 - ExchangeCoin int64 //兑换 - ClubAddCoin int64 //俱乐部加币 - RebateCoin int64 //返利 - Activity int64 //活动获取 - CoinDetailed []*CoinDetailed - PageNo int //当前页 - PageSize int //每页数量 - PageNum int //总页数 -} - -// /个人报表 -type ReportForm struct { - ShowType int //标签 棋牌游戏等等 - ProfitCoin int64 //盈利总额 - BetCoin int64 //有效投注总额 - FlowCoin int64 //流水总额 -} - -// ////////////////////////////////// -type HallGameType struct { - GameId int32 - GameMode int32 -} -type GameConfig struct { - Platform string - IsKnowType bool - BigGameType map[int32]map[int32][]*HallGameType -} - -//func (this *PersonInfo) FormatConfig(platform string, btl []*protocol.BigTagList) { -// if this.PlatformType[platform] == nil || (this.PlatformType[platform] != nil && !this.PlatformType[platform].IsKnowType) { -// gcf := &GameConfig{ -// Platform: platform, -// IsKnowType: true, -// } -// for _, bigTag := range btl { -// gcf.BigGameType[bigTag.GetBigTagId()] = make(map[int32][]*HallGameType) -// for _, smallTag := range bigTag.SmallTagList { -// gcf.BigGameType[bigTag.GetBigTagId()][smallTag.GetSmallTagId()] = []*HallGameType{} -// bs := gcf.BigGameType[bigTag.GetBigTagId()][smallTag.GetSmallTagId()] -// for _, v := range smallTag.GameType { -// bs = append(bs, &HallGameType{GameId: v.GetGameId(), GameMode: v.GetGameMode()}) -// } -// } -// } -// this.PlatformType[platform] = gcf -// } -//} - -type PersonInfo struct { - PlatformType map[string]*GameConfig -} - -var PersonInfoMgrSingTon = &PersonInfo{ - PlatformType: make(map[string]*GameConfig), -} - -func init() { - //RegisterParallelLoadFunc("平台返利数据", func() error { - // RebateInfoMgrSington.LoadRebateData() - // return nil - //}) -} diff --git a/worldsrv/taskmgr.go b/worldsrv/taskmgr.go index a16e125..034aa97 100644 --- a/worldsrv/taskmgr.go +++ b/worldsrv/taskmgr.go @@ -157,11 +157,7 @@ func (t *TaskHandle) AllTask(id int, data any) { logger.Logger.Tracef("AllTask taskID:%v %v", id, p.WelfData.Task[int32(id)]) change := map[int32][]*taskproto.TaskData{} - for _, v := range srvdata.PBDB_TaskMgr.Datas.GetArr() { - // 任务类型 - if int(v.TaskType) != id { - continue - } + for _, v := range srvdata.TaskMgr.Get(int32(id)) { if !info.Debug { // 游戏类型 switch v.GetGameType() { diff --git a/worldsrv/trascate_webapi.go b/worldsrv/trascate_webapi.go index 3e1d5bb..84031b6 100644 --- a/worldsrv/trascate_webapi.go +++ b/worldsrv/trascate_webapi.go @@ -54,16 +54,16 @@ type WebAPITranscateHandler struct { var WebAPIStats = make(map[string]*model.APITransactStats) // 返利配置 -type RebateInfos struct { - Platform string //平台名称 - RebateSwitch bool //返利开关 - RebateManState int //返利是开启个人返利 0 关闭 1 开启 - ReceiveMode int //领取方式 0实时领取 1次日领取 - NotGiveOverdue int //0不过期 1过期不给 2过期邮件给 - RebateGameCfg []*RebateGameCfg //key为"gameid"+"gamemode" - RebateGameThirdCfg []*RebateGameThirdCfg //第三方key - Version int //活动版本 后台控制 -} +//type RebateInfos struct { +// Platform string //平台名称 +// RebateSwitch bool //返利开关 +// RebateManState int //返利是开启个人返利 0 关闭 1 开启 +// ReceiveMode int //领取方式 0实时领取 1次日领取 +// NotGiveOverdue int //0不过期 1过期不给 2过期邮件给 +// RebateGameCfg []*RebateGameCfg //key为"gameid"+"gamemode" +// RebateGameThirdCfg []*RebateGameThirdCfg //第三方key +// Version int //活动版本 后台控制 +//} func (this *WebAPITranscateHandler) OnExcute(tNode *transact.TransNode, ud interface{}) transact.TransExeResult { logger.Logger.Trace("WebAPITranscateHandler.OnExcute ")