From fe0904c4fb95dae9e578c19101fa5045ddf077d9 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Fri, 26 Apr 2024 13:51:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A0=B4=E4=BA=A7=E6=B6=88=E6=81=AF=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B8=A0=E9=81=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/bankruptlog.go | 4 +++- worldsrv/action_server.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/model/bankruptlog.go b/model/bankruptlog.go index fd7a57c..6ab54de 100644 --- a/model/bankruptlog.go +++ b/model/bankruptlog.go @@ -12,6 +12,7 @@ var ( type BankruptLog struct { LogId bson.ObjectId `bson:"_id"` SnId int32 //玩家id + Channel string // 渠道 Platform string //平台名称 GameId int //游戏id GameFreeID int32 //房间id @@ -26,10 +27,11 @@ func NewBankruptLog() *BankruptLog { return log } -func NewBankruptLogEx(snid int32, gamefreeid int32, createtime, usecoin int64, platform string, gameId int) *BankruptLog { +func NewBankruptLogEx(snid int32, gamefreeid int32, createtime, usecoin int64, platform, channel string, gameId int) *BankruptLog { cl := NewBankruptLog() cl.SnId = snid cl.Platform = platform + cl.Channel = channel cl.GameId = gameId cl.GameFreeID = gamefreeid diff --git a/worldsrv/action_server.go b/worldsrv/action_server.go index 1e63b05..7ba92d6 100644 --- a/worldsrv/action_server.go +++ b/worldsrv/action_server.go @@ -121,7 +121,7 @@ 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, scene.gameId) + log := model.NewBankruptLogEx(p.SnId, scene.dbGameFree.GetId(), p.CreateTime.Unix(), CostCoin, p.Platform, p.Channel, scene.gameId) if log != nil { LogChannelSingleton.WriteLog(log) }