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)
@ -668,12 +668,12 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
var ret ReportGameEventOnly var ret ReportGameEventOnly
ret.Param = param ret.Param = param
log := &model.PlayerGameRecEvent{ log := &model.PlayerGameRecEvent{
Platform: this.Platform, Platform: this.Platform,
RecordId: this.scene.GetRecordId(), RecordId: this.scene.GetRecordId(),
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

@ -245,34 +245,35 @@ func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, i
// 玩家游戏记录 // 玩家游戏记录
type PlayerGameRecEvent struct { 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 //平台 OS string //操作系统
City string //城市 GameId int32 //游戏id
OS string //操作系统 ModeId int32 //游戏模式
TelephonePromoter int32 //电销标记 Tax int64 //税收
GameId int32 //游戏id Amount int64 //金币变化,税后(正值为赢;负值为输)
ModeId int32 //游戏模式 CreateTime int64 //创建时间
Tax int64 //税收 CreateDayTime int64 //账号创建时间0点
Amount int64 //金币变化(正值为赢;负值为输) Out int64 //产出
CreateTime int64 //创建时间 In int64 //投入
CreateDayTime int64 //账号创建时间0点 IsNew int32 //是否是新人
ValidBet int64 //有效下注数量 GameFreeID int32 //游戏freeid
ValidFlow int64 //有效流水数量 GamingTime int32 //游戏开始到玩家结算的时长 单位:秒
Out int64 //产出
In int64 //投入 GameDif int32 // 游戏分组
IsNew int32 //是否是新人 FirstGameDifTime int64 // 首次游戏分组时间
GameFreeID int32 //游戏freeid GameDifTimes int64 // 游戏分组游戏次数
GamingTime int32 //游戏开始到玩家结算的时长 单位:秒
FirstTime int64 //首次玩该场次游戏时间 FirstTime int64 //首次玩该场次游戏时间
PlayTimes int64 //该场次游戏次数 PlayTimes int64 //该场次游戏次数
FirstGameTime int64 //首次玩游戏时间
PlayGameTimes int64 //该游戏总次数 FirstGameTime int64 //首次玩游戏时间
LastLoginTime int64 //最后登录时间 PlayGameTimes int64 //该游戏总次数
DeviceId string //设备id
ChannelId string //推广渠道id LastLoginTime int64 //最后登录时间
ChannelId string //推广渠道id
} }
// 玩家游戏记录 // 玩家游戏记录