Compare commits
4 Commits
731b9857c1
...
f8d62e3be4
Author | SHA1 | Date |
---|---|---|
|
f8d62e3be4 | |
|
bf227fc024 | |
|
aee3fbb10c | |
|
a79737342e |
|
@ -118,7 +118,7 @@ func (svc *PlayerDataSvc) InsertPlayerData(args *model.InsertPlayerDataParam, re
|
|||
}
|
||||
var dataParams model.PlayerParams
|
||||
json.Unmarshal([]byte(a.Params), &dataParams)
|
||||
pd = model.NewPlayerData(acc, name, args.HeadUrl, id, a.Channel, a.Platform, a.Params,
|
||||
pd = model.NewPlayerData(acc, a.UserName, 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)
|
||||
if pd != nil {
|
||||
if pd.ICode == "" {
|
||||
|
@ -203,7 +203,7 @@ func (svc *PlayerDataSvc) GetPlayerDataBySnId(args *model.GetPlayerDataBySnIdArg
|
|||
if name == "" {
|
||||
name = "Guest"
|
||||
}
|
||||
pd := model.NewPlayerData(a.AccountId.Hex(), name, "", a.SnId, a.Channel, a.Platform, a.Params,
|
||||
pd := model.NewPlayerData(a.AccountId.Hex(), a.UserName, 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)
|
||||
if pd != nil {
|
||||
if pd.ICode == "" {
|
||||
|
|
|
@ -182,6 +182,7 @@ func (this *Scene) SaveGamePlayerListLog(param *SaveGamePlayerListLogParam) *Sav
|
|||
WinSmallGame: param.WinSmallGame,
|
||||
WinTotal: param.WinTotal,
|
||||
CycleId: this.CycleID,
|
||||
Username: p.Username,
|
||||
}
|
||||
if param.OnlyLog {
|
||||
ret.Log = append(ret.Log, log)
|
||||
|
|
|
@ -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)
|
||||
|
@ -673,7 +673,7 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
|
|||
SnId: this.GetSnId(),
|
||||
Channel: this.Channel,
|
||||
ChannelId: this.ChannelId,
|
||||
City: this.City,
|
||||
//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)
|
||||
|
|
|
@ -691,9 +691,9 @@ func (this *SceneBaseStateTienLen) OnPlayerOp(s *base.Scene, p *base.Player, opc
|
|||
|
||||
if sceneEx.IsCustom() && sceneEx.GetSceneState().GetState() == rule.TienLenSceneStateWaitPlayer {
|
||||
// 玩家继续
|
||||
if !playerEx.IsMarkFlag(base.PlayerState_Ready) {
|
||||
playerEx.MarkFlag(base.PlayerState_Ready)
|
||||
}
|
||||
//if !playerEx.IsMarkFlag(base.PlayerState_Ready) {
|
||||
// playerEx.MarkFlag(base.PlayerState_Ready)
|
||||
//}
|
||||
// 扣房费
|
||||
// 房主扣费
|
||||
if (sceneEx.GetCustom().GetCostType() == 2 && playerEx.SnId == sceneEx.GetCreator()) ||
|
||||
|
@ -1782,6 +1782,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
playerEx.CurIsWin = int64(0)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: playerEx.SnId,
|
||||
Username: playerEx.Username,
|
||||
UserIcon: playerEx.Head,
|
||||
Platform: playerEx.Platform,
|
||||
Channel: playerEx.Channel,
|
||||
|
@ -1934,6 +1935,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
losePlayer.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: losePlayer.SnId,
|
||||
Username: losePlayer.Username,
|
||||
UserIcon: losePlayer.Head,
|
||||
Platform: losePlayer.Platform,
|
||||
Channel: losePlayer.Channel,
|
||||
|
@ -2077,6 +2079,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
lastWinPlayer.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: lastWinPlayer.SnId,
|
||||
Username: lastWinPlayer.Username,
|
||||
UserIcon: lastWinPlayer.Head,
|
||||
Platform: lastWinPlayer.Platform,
|
||||
Channel: lastWinPlayer.Channel,
|
||||
|
@ -2189,6 +2192,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
playerEx.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: playerEx.SnId,
|
||||
Username: playerEx.Username,
|
||||
UserIcon: playerEx.Head,
|
||||
Platform: playerEx.Platform,
|
||||
Channel: playerEx.Channel,
|
||||
|
@ -2295,6 +2299,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
playerEx.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: playerEx.SnId,
|
||||
Username: playerEx.Username,
|
||||
UserIcon: playerEx.Head,
|
||||
Platform: playerEx.Platform,
|
||||
Channel: playerEx.Channel,
|
||||
|
@ -2447,6 +2452,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
playerEx.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: playerEx.SnId,
|
||||
Username: playerEx.Username,
|
||||
UserIcon: playerEx.Head,
|
||||
Platform: playerEx.Platform,
|
||||
Channel: playerEx.Channel,
|
||||
|
@ -2578,6 +2584,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
|||
playerEx.CurIsWin = int64(isWin)
|
||||
tienlenPerson := model.TienLenPerson{
|
||||
UserId: playerEx.SnId,
|
||||
Username: playerEx.Username,
|
||||
UserIcon: playerEx.Head,
|
||||
Platform: playerEx.Platform,
|
||||
Channel: playerEx.Channel,
|
||||
|
|
|
@ -248,30 +248,31 @@ 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 //金币变化(正值为赢;负值为输)
|
||||
Amount int64 //金币变化,税后(正值为赢;负值为输)
|
||||
CreateTime int64 //创建时间
|
||||
CreateDayTime int64 //账号创建时间0点
|
||||
ValidBet int64 //有效下注数量
|
||||
ValidFlow int64 //有效流水数量
|
||||
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 //最后登录时间
|
||||
DeviceId string //设备id
|
||||
ChannelId string //推广渠道id
|
||||
}
|
||||
|
||||
|
|
|
@ -1533,6 +1533,7 @@ type TienLenAddItem struct {
|
|||
|
||||
type TienLenPerson struct {
|
||||
UserId int32 //玩家ID
|
||||
Username string // 用户名
|
||||
UserIcon int32 //玩家头像
|
||||
Platform string `json:"-"`
|
||||
Channel string `json:"-"`
|
||||
|
|
|
@ -56,6 +56,7 @@ type GamePlayerListLog struct {
|
|||
WinSmallGame int64 //拉霸专用 小游戏奖励
|
||||
WinTotal int64 //拉霸专用 输赢
|
||||
CycleId string // 本轮id,打一轮有多局
|
||||
Username string
|
||||
}
|
||||
|
||||
func NewGamePlayerListLog() *GamePlayerListLog {
|
||||
|
|
|
@ -365,6 +365,7 @@ type WGPlayerInfo struct {
|
|||
type PlayerData struct {
|
||||
Id bson.ObjectId `bson:"_id"`
|
||||
AccountId string //账号id
|
||||
Username string // 用户名
|
||||
AccountType int32 //账号类型
|
||||
SnId int32 //数字唯一id
|
||||
NiceId int32 //靓号
|
||||
|
@ -923,7 +924,7 @@ func (this *PlayerData) UpdateParams(params string) *PlayerParams {
|
|||
return &pp
|
||||
}
|
||||
|
||||
func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform string, params, tel string,
|
||||
func NewPlayerData(acc string, username, name, headUrl string, id int32, channel, platform string, params, tel string,
|
||||
packTag, ip string, tagkey, accountType int32, deviceOS, channelId string, clientVer int32) *PlayerData {
|
||||
if len(name) == 0 {
|
||||
logger.Logger.Trace("New player name is empty.")
|
||||
|
@ -939,6 +940,7 @@ func NewPlayerData(acc string, name, headUrl string, id int32, channel, platform
|
|||
pd := &PlayerData{
|
||||
Id: bson.NewObjectId(),
|
||||
AccountId: acc,
|
||||
Username: username,
|
||||
Name: name,
|
||||
Channel: channel,
|
||||
ChannelId: channelId,
|
||||
|
|
Loading…
Reference in New Issue