modify:游戏记录上报

This commit is contained in:
sk 2024-12-12 14:06:11 +08:00
parent 4d226415e2
commit a79737342e
2 changed files with 44 additions and 43 deletions

View File

@ -641,15 +641,15 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
var gameTimes, gameFreeTimes int64 var gameTimes, gameFreeTimes int64
data, ok := this.GDatas[this.scene.KeyGamefreeId] data, ok := this.GDatas[this.scene.KeyGamefreeId]
if ok { if ok {
gameFirstTime = data.FirstTime gameFreeFirstTime = data.FirstTime
gameTimes = data.Statics.GameTimes gameFreeTimes = data.Statics.GameTimes
} }
// 记录玩家 首次参与该游戏时间 游戏次数(不区分场次) // 记录玩家 首次参与该游戏时间 游戏次数(不区分场次)
dataGame, ok := this.GDatas[this.scene.KeyGameId] dataGame, ok := this.GDatas[this.scene.KeyGameId]
if ok { if ok {
gameFreeFirstTime = dataGame.FirstTime gameFirstTime = dataGame.FirstTime
gameFreeTimes = dataGame.Statics.GameTimes gameTimes = dataGame.Statics.GameTimes
} }
isNew := int32(0) isNew := int32(0)
@ -673,7 +673,7 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
SnId: this.GetSnId(), SnId: this.GetSnId(),
Channel: this.Channel, Channel: this.Channel,
ChannelId: this.ChannelId, ChannelId: this.ChannelId,
City: this.City, //City: this.City,
OS: this.DeviceOS, OS: this.DeviceOS,
GameId: this.scene.GameId, GameId: this.scene.GameId,
ModeId: this.scene.GameMode, ModeId: this.scene.GameMode,
@ -686,12 +686,12 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
IsNew: isNew, IsNew: isNew,
GameFreeID: this.scene.GetGameFreeId(), GameFreeID: this.scene.GetGameFreeId(),
GamingTime: int32(param.GameTime), GamingTime: int32(param.GameTime),
FirstTime: gameFirstTime.Unix(), FirstTime: gameFreeFirstTime.Unix(),
PlayTimes: gameTimes, PlayTimes: gameFreeTimes,
FirstGameTime: gameFreeFirstTime.Unix(), FirstGameTime: gameFirstTime.Unix(),
PlayGameTimes: gameFreeTimes, PlayGameTimes: gameTimes,
LastLoginTime: this.LastLoginTime.Unix(), LastLoginTime: this.LastLoginTime.Unix(),
DeviceId: this.DeviceId, //DeviceId: this.DeviceId,
} }
if param.OnlyLog { if param.OnlyLog {
ret.Log = append(ret.Log, log) ret.Log = append(ret.Log, log)

View File

@ -248,30 +248,31 @@ type PlayerGameRecEvent struct {
RecordId string //游戏记录ID RecordId string //游戏记录ID
SnId int32 //用户ID SnId int32 //用户ID
Channel string //包类型 Channel string //包类型
Promoter string //推广
Platform string //平台 Platform string //平台
City string //城市
OS string //操作系统 OS string //操作系统
TelephonePromoter int32 //电销标记
GameId int32 //游戏id GameId int32 //游戏id
ModeId int32 //游戏模式 ModeId int32 //游戏模式
Tax int64 //税收 Tax int64 //税收
Amount int64 //金币变化(正值为赢;负值为输) Amount int64 //金币变化,税后(正值为赢;负值为输)
CreateTime int64 //创建时间 CreateTime int64 //创建时间
CreateDayTime int64 //账号创建时间0点 CreateDayTime int64 //账号创建时间0点
ValidBet int64 //有效下注数量
ValidFlow int64 //有效流水数量
Out int64 //产出 Out int64 //产出
In int64 //投入 In int64 //投入
IsNew int32 //是否是新人 IsNew int32 //是否是新人
GameFreeID int32 //游戏freeid GameFreeID int32 //游戏freeid
GamingTime int32 //游戏开始到玩家结算的时长 单位:秒 GamingTime int32 //游戏开始到玩家结算的时长 单位:秒
GameDif int32 // 游戏分组
FirstGameDifTime int64 // 首次游戏分组时间
GameDifTimes int64 // 游戏分组游戏次数
FirstTime int64 //首次玩该场次游戏时间 FirstTime int64 //首次玩该场次游戏时间
PlayTimes int64 //该场次游戏次数 PlayTimes int64 //该场次游戏次数
FirstGameTime int64 //首次玩游戏时间 FirstGameTime int64 //首次玩游戏时间
PlayGameTimes int64 //该游戏总次数 PlayGameTimes int64 //该游戏总次数
LastLoginTime int64 //最后登录时间 LastLoginTime int64 //最后登录时间
DeviceId string //设备id
ChannelId string //推广渠道id ChannelId string //推广渠道id
} }