add:游戏记录上报数据添加唯一id

This commit is contained in:
sk 2024-12-12 16:08:22 +08:00
parent 500fed59dd
commit cab63a8bf9
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
"math/rand" "math/rand"
"time" "time"
"go.mongodb.org/mongo-driver/bson/primitive"
rawproto "google.golang.org/protobuf/proto" rawproto "google.golang.org/protobuf/proto"
"mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/logger"
"mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/netlib"
@ -668,6 +669,7 @@ 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{
Id: primitive.NewObjectID().Hex(),
Platform: this.Platform, Platform: this.Platform,
RecordId: this.scene.GetRecordId(), RecordId: this.scene.GetRecordId(),
SnId: this.GetSnId(), SnId: this.GetSnId(),

View File

@ -245,6 +245,7 @@ func CreatePlayerLoginEvent(snid int32, channel, promoter, platform, city, os, i
// 玩家游戏记录 // 玩家游戏记录
type PlayerGameRecEvent struct { type PlayerGameRecEvent struct {
Id string //id
RecordId string //游戏记录ID RecordId string //游戏记录ID
SnId int32 //用户ID SnId int32 //用户ID
Channel string //包类型 Channel string //包类型