add:破产记录添加游戏组id

This commit is contained in:
sk 2024-12-20 09:21:24 +08:00
parent bb8af52a6b
commit 39890efbfa
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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)
}