From 500fed59dd03337f2f308e5da5028a52da351364 Mon Sep 17 00:00:00 2001 From: sk <123456@qq.com> Date: Thu, 12 Dec 2024 14:06:11 +0800 Subject: [PATCH] =?UTF-8?q?modify:=E6=B8=B8=E6=88=8F=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/base/player.go | 30 +++++++++++----------- model/dataevent.go | 57 +++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/gamesrv/base/player.go b/gamesrv/base/player.go index 1bcdf6e..41cd834 100644 --- a/gamesrv/base/player.go +++ b/gamesrv/base/player.go @@ -641,15 +641,15 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven var gameTimes, gameFreeTimes int64 data, ok := this.GDatas[this.scene.KeyGamefreeId] if ok { - gameFirstTime = data.FirstTime - gameTimes = data.Statics.GameTimes + gameFreeFirstTime = data.FirstTime + gameFreeTimes = data.Statics.GameTimes } // 记录玩家 首次参与该游戏时间 游戏次数(不区分场次) dataGame, ok := this.GDatas[this.scene.KeyGameId] if ok { - gameFreeFirstTime = dataGame.FirstTime - gameFreeTimes = dataGame.Statics.GameTimes + gameFirstTime = dataGame.FirstTime + gameTimes = dataGame.Statics.GameTimes } isNew := int32(0) @@ -668,12 +668,12 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven var ret ReportGameEventOnly ret.Param = param log := &model.PlayerGameRecEvent{ - Platform: this.Platform, - RecordId: this.scene.GetRecordId(), - SnId: this.GetSnId(), - Channel: this.Channel, - ChannelId: this.ChannelId, - City: this.City, + Platform: this.Platform, + RecordId: this.scene.GetRecordId(), + SnId: this.GetSnId(), + Channel: this.Channel, + ChannelId: this.ChannelId, + //City: this.City, OS: this.DeviceOS, GameId: this.scene.GameId, ModeId: this.scene.GameMode, @@ -686,12 +686,12 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven IsNew: isNew, GameFreeID: this.scene.GetGameFreeId(), GamingTime: int32(param.GameTime), - FirstTime: gameFirstTime.Unix(), - PlayTimes: gameTimes, - FirstGameTime: gameFreeFirstTime.Unix(), - PlayGameTimes: gameFreeTimes, + FirstTime: gameFreeFirstTime.Unix(), + PlayTimes: gameFreeTimes, + FirstGameTime: gameFirstTime.Unix(), + PlayGameTimes: gameTimes, LastLoginTime: this.LastLoginTime.Unix(), - DeviceId: this.DeviceId, + //DeviceId: this.DeviceId, } if param.OnlyLog { ret.Log = append(ret.Log, log) diff --git a/model/dataevent.go b/model/dataevent.go index b3d138f..2469845 100644 --- a/model/dataevent.go +++ b/model/dataevent.go @@ -245,34 +245,35 @@ func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, i // 玩家游戏记录 type PlayerGameRecEvent struct { - RecordId string //游戏记录ID - SnId int32 //用户ID - Channel string //包类型 - Promoter string //推广 - Platform string //平台 - City string //城市 - OS string //操作系统 - TelephonePromoter int32 //电销标记 - GameId int32 //游戏id - ModeId int32 //游戏模式 - Tax int64 //税收 - Amount int64 //金币变化(正值为赢;负值为输) - CreateTime int64 //创建时间 - CreateDayTime int64 //账号创建时间0点 - ValidBet int64 //有效下注数量 - ValidFlow int64 //有效流水数量 - Out int64 //产出 - In int64 //投入 - IsNew int32 //是否是新人 - GameFreeID int32 //游戏freeid - GamingTime int32 //游戏开始到玩家结算的时长 单位:秒 - FirstTime int64 //首次玩该场次游戏时间 - PlayTimes int64 //该场次游戏次数 - FirstGameTime int64 //首次玩游戏时间 - PlayGameTimes int64 //该游戏总次数 - LastLoginTime int64 //最后登录时间 - DeviceId string //设备id - ChannelId string //推广渠道id + RecordId string //游戏记录ID + SnId int32 //用户ID + Channel string //包类型 + Platform string //平台 + OS string //操作系统 + GameId int32 //游戏id + ModeId int32 //游戏模式 + Tax int64 //税收 + Amount int64 //金币变化,税后(正值为赢;负值为输) + CreateTime int64 //创建时间 + CreateDayTime int64 //账号创建时间0点 + Out int64 //产出 + In int64 //投入 + IsNew int32 //是否是新人 + GameFreeID int32 //游戏freeid + GamingTime int32 //游戏开始到玩家结算的时长 单位:秒 + + GameDif int32 // 游戏分组 + FirstGameDifTime int64 // 首次游戏分组时间 + GameDifTimes int64 // 游戏分组游戏次数 + + FirstTime int64 //首次玩该场次游戏时间 + PlayTimes int64 //该场次游戏次数 + + FirstGameTime int64 //首次玩游戏时间 + PlayGameTimes int64 //该游戏总次数 + + LastLoginTime int64 //最后登录时间 + ChannelId string //推广渠道id } // 玩家游戏记录