From 39890efbfa262236b116f1cd99044ccc3a35eefe Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 20 Dec 2024 09:21:24 +0800 Subject: [PATCH] =?UTF-8?q?add:=E7=A0=B4=E4=BA=A7=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B8=B8=E6=88=8F=E7=BB=84id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/bankruptlog.go | 6 +++++- worldsrv/action_server.go | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/model/bankruptlog.go b/model/bankruptlog.go index 47efa36..a6f1278 100644 --- a/model/bankruptlog.go +++ b/model/bankruptlog.go @@ -8,9 +8,11 @@ type BankruptLog struct { LogId bson.ObjectId `bson:"_id"` SnId int32 //玩家id Channel string // 渠道 + ChannelId string // 推广渠道 Platform string //平台名称 GameId int //游戏id GameFreeID int32 //房间id + GameDif string // 游戏分组 CreateTime int64 // 注册时间 UseCoin int64 // 消耗金币 @@ -22,12 +24,14 @@ func NewBankruptLog() *BankruptLog { return log } -func NewBankruptLogEx(snid int32, gamefreeid int32, createtime, usecoin int64, platform, channel string, gameId int) *BankruptLog { +func NewBankruptLogEx(snid int32, gamefreeid int32, createtime, usecoin int64, platform, channel, channelId, gamedif string, gameId int) *BankruptLog { cl := NewBankruptLog() cl.SnId = snid cl.Platform = platform cl.Channel = channel + cl.ChannelId = channelId cl.GameId = gameId + cl.GameDif = gamedif cl.GameFreeID = gamefreeid cl.CreateTime = createtime diff --git a/worldsrv/action_server.go b/worldsrv/action_server.go index dc24fd3..05001a1 100644 --- a/worldsrv/action_server.go +++ b/worldsrv/action_server.go @@ -134,7 +134,8 @@ func init() { CostCoin := p.takeCoin - msg.GetReturnCoin() logger.Logger.Infof("NewBankruptLogEx: snid:%v GetReturnCoin:%v coin:%v CostCoin:%v", p.SnId, msg.GetReturnCoin(), p.takeCoin, CostCoin) - log := model.NewBankruptLogEx(p.SnId, scene.dbGameFree.GetId(), p.CreateTime.Unix(), CostCoin, p.Platform, p.Channel, scene.gameId) + log := model.NewBankruptLogEx(p.SnId, scene.dbGameFree.GetId(), p.CreateTime.Unix(), CostCoin, + p.Platform, p.Channel, p.ChannelId, scene.dbGameFree.GetGameDif(), scene.gameId) if log != nil { mq.Write(log) }