Compare commits

..

No commits in common. "f8d62e3be4edd7200003d0f40e53aa540436b48e" and "731b9857c1fe4b6d63a7ba68e08ee9c16f27dea0" have entirely different histories.

8 changed files with 49 additions and 62 deletions

View File

@ -118,7 +118,7 @@ func (svc *PlayerDataSvc) InsertPlayerData(args *model.InsertPlayerDataParam, re
} }
var dataParams model.PlayerParams var dataParams model.PlayerParams
json.Unmarshal([]byte(a.Params), &dataParams) json.Unmarshal([]byte(a.Params), &dataParams)
pd = model.NewPlayerData(acc, a.UserName, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params, pd = model.NewPlayerData(acc, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer) a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer)
if pd != nil { if pd != nil {
if pd.ICode == "" { if pd.ICode == "" {
@ -203,7 +203,7 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
if name == "" { if name == "" {
name = "Guest" name = "Guest"
} }
pd := model.NewPlayerData(a.AccountId.Hex(), a.UserName, name, "", a.SnId, a.Channel, a.Platform, a.Params, pd := model.NewPlayerData(a.AccountId.Hex(), name, "", a.SnId, a.Channel, a.Platform, a.Params,
a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer) a.Tel, a.PackegeTag, dataParams.Ip, a.TagKey, a.AccountType, a.DeviceOs, a.ChannelId, a.ClientVer)
if pd != nil { if pd != nil {
if pd.ICode == "" { if pd.ICode == "" {

View File

@ -182,7 +182,6 @@ func (this *Scene) SaveGamePlayerListLog(param *SaveGamePlayerListLogParam) *Sav
WinSmallGame: param.WinSmallGame, WinSmallGame: param.WinSmallGame,
WinTotal: param.WinTotal, WinTotal: param.WinTotal,
CycleId: this.CycleID, CycleId: this.CycleID,
Username: p.Username,
} }
if param.OnlyLog { if param.OnlyLog {
ret.Log = append(ret.Log, log) ret.Log = append(ret.Log, log)

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 {
gameFreeFirstTime = data.FirstTime gameFirstTime = data.FirstTime
gameFreeTimes = data.Statics.GameTimes gameTimes = data.Statics.GameTimes
} }
// 记录玩家 首次参与该游戏时间 游戏次数(不区分场次) // 记录玩家 首次参与该游戏时间 游戏次数(不区分场次)
dataGame, ok := this.GDatas[this.scene.KeyGameId] dataGame, ok := this.GDatas[this.scene.KeyGameId]
if ok { if ok {
gameFirstTime = dataGame.FirstTime gameFreeFirstTime = dataGame.FirstTime
gameTimes = dataGame.Statics.GameTimes gameFreeTimes = 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: gameFreeFirstTime.Unix(), FirstTime: gameFirstTime.Unix(),
PlayTimes: gameFreeTimes, PlayTimes: gameTimes,
FirstGameTime: gameFirstTime.Unix(), FirstGameTime: gameFreeFirstTime.Unix(),
PlayGameTimes: gameTimes, PlayGameTimes: gameFreeTimes,
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

@ -691,9 +691,9 @@ func (this *SceneBaseStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player, opc
if sceneEx.IsCustom() && sceneEx.GetSceneState().GetState() == rule.TienLenSceneStateWaitPlayer { if sceneEx.IsCustom() && sceneEx.GetSceneState().GetState() == rule.TienLenSceneStateWaitPlayer {
// 玩家继续 // 玩家继续
//if !playerEx.IsMarkFlag(base.PlayerState_Ready) { if !playerEx.IsMarkFlag(base.PlayerState_Ready) {
// playerEx.MarkFlag(base.PlayerState_Ready) playerEx.MarkFlag(base.PlayerState_Ready)
//} }
// 扣房费 // 扣房费
// 房主扣费 // 房主扣费
if (sceneEx.GetCustom().GetCostType() == 2 && playerEx.SnId == sceneEx.GetCreator()) || if (sceneEx.GetCustom().GetCostType() == 2 && playerEx.SnId == sceneEx.GetCreator()) ||
@ -1782,7 +1782,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
playerEx.CurIsWin = int64(0) playerEx.CurIsWin = int64(0)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: playerEx.SnId, UserId: playerEx.SnId,
Username: playerEx.Username,
UserIcon: playerEx.Head, UserIcon: playerEx.Head,
Platform: playerEx.Platform, Platform: playerEx.Platform,
Channel: playerEx.Channel, Channel: playerEx.Channel,
@ -1935,7 +1934,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
losePlayer.CurIsWin = int64(isWin) losePlayer.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: losePlayer.SnId, UserId: losePlayer.SnId,
Username: losePlayer.Username,
UserIcon: losePlayer.Head, UserIcon: losePlayer.Head,
Platform: losePlayer.Platform, Platform: losePlayer.Platform,
Channel: losePlayer.Channel, Channel: losePlayer.Channel,
@ -2079,7 +2077,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
lastWinPlayer.CurIsWin = int64(isWin) lastWinPlayer.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: lastWinPlayer.SnId, UserId: lastWinPlayer.SnId,
Username: lastWinPlayer.Username,
UserIcon: lastWinPlayer.Head, UserIcon: lastWinPlayer.Head,
Platform: lastWinPlayer.Platform, Platform: lastWinPlayer.Platform,
Channel: lastWinPlayer.Channel, Channel: lastWinPlayer.Channel,
@ -2192,7 +2189,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
playerEx.CurIsWin = int64(isWin) playerEx.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: playerEx.SnId, UserId: playerEx.SnId,
Username: playerEx.Username,
UserIcon: playerEx.Head, UserIcon: playerEx.Head,
Platform: playerEx.Platform, Platform: playerEx.Platform,
Channel: playerEx.Channel, Channel: playerEx.Channel,
@ -2299,7 +2295,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
playerEx.CurIsWin = int64(isWin) playerEx.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: playerEx.SnId, UserId: playerEx.SnId,
Username: playerEx.Username,
UserIcon: playerEx.Head, UserIcon: playerEx.Head,
Platform: playerEx.Platform, Platform: playerEx.Platform,
Channel: playerEx.Channel, Channel: playerEx.Channel,
@ -2452,7 +2447,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
playerEx.CurIsWin = int64(isWin) playerEx.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: playerEx.SnId, UserId: playerEx.SnId,
Username: playerEx.Username,
UserIcon: playerEx.Head, UserIcon: playerEx.Head,
Platform: playerEx.Platform, Platform: playerEx.Platform,
Channel: playerEx.Channel, Channel: playerEx.Channel,
@ -2584,7 +2578,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
playerEx.CurIsWin = int64(isWin) playerEx.CurIsWin = int64(isWin)
tienlenPerson := model.TienLenPerson{ tienlenPerson := model.TienLenPerson{
UserId: playerEx.SnId, UserId: playerEx.SnId,
Username: playerEx.Username,
UserIcon: playerEx.Head, UserIcon: playerEx.Head,
Platform: playerEx.Platform, Platform: playerEx.Platform,
Channel: playerEx.Channel, Channel: playerEx.Channel,

View File

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

View File

@ -1533,7 +1533,6 @@ type TienLenAddItem struct {
type TienLenPerson struct { type TienLenPerson struct {
UserId int32 //玩家ID UserId int32 //玩家ID
Username string // 用户名
UserIcon int32 //玩家头像 UserIcon int32 //玩家头像
Platform string `json:"-"` Platform string `json:"-"`
Channel string `json:"-"` Channel string `json:"-"`

View File

@ -56,7 +56,6 @@ type GamePlayerListLog struct {
WinSmallGame int64 //拉霸专用 小游戏奖励 WinSmallGame int64 //拉霸专用 小游戏奖励
WinTotal int64 //拉霸专用 输赢 WinTotal int64 //拉霸专用 输赢
CycleId string // 本轮id打一轮有多局 CycleId string // 本轮id打一轮有多局
Username string
} }
func NewGamePlayerListLog() *GamePlayerListLog { func NewGamePlayerListLog() *GamePlayerListLog {

View File

@ -365,7 +365,6 @@ type WGPlayerInfo struct {
type PlayerData struct { type PlayerData struct {
Id bson.ObjectId `bson:"_id"` Id bson.ObjectId `bson:"_id"`
AccountId string //账号id AccountId string //账号id
Username string // 用户名
AccountType int32 //账号类型 AccountType int32 //账号类型
SnId int32 //数字唯一id SnId int32 //数字唯一id
NiceId int32 //靓号 NiceId int32 //靓号
@ -924,7 +923,7 @@ func (this *PlayerData) UpdateParams(params string) *PlayerParams {
return &pp return &pp
} }
func NewPlayerData(acc string, username, name, headUrl string, id int32, channel, platform string, params, tel string, func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform string, params, tel string,
packTag, ip string, tagkey, accountType int32, deviceOS, channelId string, clientVer int32) *PlayerData { packTag, ip string, tagkey, accountType int32, deviceOS, channelId string, clientVer int32) *PlayerData {
if len(name) == 0 { if len(name) == 0 {
logger.Logger.Trace("New player name is empty.") logger.Logger.Trace("New player name is empty.")
@ -940,7 +939,6 @@ func NewPlayerData(acc string, username, name, headUrl string, id int32, channel
pd := &PlayerData{ pd := &PlayerData{
Id: bson.NewObjectId(), Id: bson.NewObjectId(),
AccountId: acc, AccountId: acc,
Username: username,
Name: name, Name: name,
Channel: channel, Channel: channel,
ChannelId: channelId, ChannelId: channelId,