修改牌局记录
This commit is contained in:
parent
2fb75da43e
commit
fe88981e9d
|
@ -934,31 +934,30 @@ func AvengersCheckAndSaveLog(sceneEx *AvengersSceneData, playerEx *AvengersPlaye
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||||
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
||||||
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
||||||
ValidBet: validBet,
|
IsFirstGame: false,
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
|
||||||
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
||||||
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
||||||
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
||||||
}
|
GameTime: 1,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/jinzhu/now"
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
@ -621,7 +622,14 @@ func (this *Player) AddRankScore(rankType int32, num int64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Player) ReportGameEvent(tax, taxex, changeCoin, validbet, validFlow, in, out int64) {
|
type ReportGameEventParam struct {
|
||||||
|
Tax int64 // 税收
|
||||||
|
Change int64 // 净输赢,正负值,不带税收
|
||||||
|
In, Out int64 // 投入,产出(税前)
|
||||||
|
GameTime int64 // 游戏时长,秒
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *Player) ReportGameEvent(param *ReportGameEventParam) {
|
||||||
// 记录玩家 首次参与该场次的游戏时间 游戏次数
|
// 记录玩家 首次参与该场次的游戏时间 游戏次数
|
||||||
var gameFirstTime, gameFreeFirstTime time.Time
|
var gameFirstTime, gameFreeFirstTime time.Time
|
||||||
var gameTimes, gameFreeTimes int64
|
var gameTimes, gameFreeTimes int64
|
||||||
|
@ -638,12 +646,46 @@ func (this *Player) ReportGameEvent(tax, taxex, changeCoin, validbet, validFlow,
|
||||||
gameFreeTimes = dataGame.Statics.GameTimes
|
gameFreeTimes = dataGame.Statics.GameTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
gamingTime := int32(time.Now().Sub(this.scene.GameNowTime).Seconds())
|
isNew := int32(0)
|
||||||
mq.Write(model.CreatePlayerGameRecEvent(this.SnId, tax, taxex, changeCoin, validbet, validFlow, in, out,
|
tCreateDay := now.New(this.CreateTime.Local()).BeginningOfDay()
|
||||||
this.scene.GameId, this.scene.GetGameFreeId(), int32(this.scene.GameMode),
|
if now.BeginningOfDay().Equal(tCreateDay) {
|
||||||
this.scene.GetRecordId(), this.Channel, this.ChannelId, this.BeUnderAgentCode, this.Platform, this.City, this.DeviceOS,
|
isNew = 1
|
||||||
this.CreateTime, gamingTime, gameFirstTime, gameFreeFirstTime, gameTimes, gameFreeTimes, this.LastLoginTime,
|
}
|
||||||
this.TelephonePromoter, this.DeviceId), mq.BackGameRecord)
|
|
||||||
|
if param.GameTime < 0 {
|
||||||
|
param.GameTime = int64(time.Now().Sub(this.scene.GameNowTime).Seconds())
|
||||||
|
}
|
||||||
|
if param.GameTime < 0 {
|
||||||
|
param.GameTime = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
log := &model.PlayerGameRecEvent{
|
||||||
|
Platform: this.Platform,
|
||||||
|
RecordId: this.scene.GetRecordId(),
|
||||||
|
SnId: this.GetSnId(),
|
||||||
|
Channel: this.Channel,
|
||||||
|
ChannelId: this.ChannelId,
|
||||||
|
City: this.City,
|
||||||
|
OS: this.DeviceOS,
|
||||||
|
GameId: this.scene.GameId,
|
||||||
|
ModeId: this.scene.GameMode,
|
||||||
|
Tax: param.Tax,
|
||||||
|
Amount: param.Change,
|
||||||
|
CreateTime: this.CreateTime.Unix(),
|
||||||
|
CreateDayTime: tCreateDay.Unix(),
|
||||||
|
Out: param.Out,
|
||||||
|
In: param.In,
|
||||||
|
IsNew: isNew,
|
||||||
|
GameFreeID: this.scene.GetGameFreeId(),
|
||||||
|
GamingTime: int32(param.GameTime),
|
||||||
|
FirstTime: gameFirstTime.Unix(),
|
||||||
|
PlayTimes: gameTimes,
|
||||||
|
FirstGameTime: gameFreeFirstTime.Unix(),
|
||||||
|
PlayGameTimes: gameFreeTimes,
|
||||||
|
LastLoginTime: this.LastLoginTime.Unix(),
|
||||||
|
DeviceId: this.DeviceId,
|
||||||
|
}
|
||||||
|
mq.Write(log, mq.BackGameRecord)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 汇总玩家该次游戏总产生的税收
|
// 汇总玩家该次游戏总产生的税收
|
||||||
|
|
|
@ -2,6 +2,7 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"github.com/globalsign/mgo/bson"
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -87,7 +88,8 @@ type Scene struct {
|
||||||
SystemCoinOut int64 //本局游戏机器人营收 机器人赢:正值 机器人输:负值
|
SystemCoinOut int64 //本局游戏机器人营收 机器人赢:正值 机器人输:负值
|
||||||
ChessRank []int32
|
ChessRank []int32
|
||||||
RealCtrl bool
|
RealCtrl bool
|
||||||
CycleID string
|
CycleID string // 房卡场多轮对局id
|
||||||
|
LogId string // 游戏每局id
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewScene(args *CreateSceneParam) *Scene {
|
func NewScene(args *CreateSceneParam) *Scene {
|
||||||
|
@ -160,75 +162,104 @@ func (this *Scene) GetGameFreeId() int32 {
|
||||||
func (this *Scene) GetKeyGameId() string {
|
func (this *Scene) GetKeyGameId() string {
|
||||||
return this.KeyGameId
|
return this.KeyGameId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetKeyGameId(keyGameId string) {
|
func (this *Scene) SetKeyGameId(keyGameId string) {
|
||||||
this.KeyGameId = keyGameId
|
this.KeyGameId = keyGameId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetSceneId() int {
|
func (this *Scene) GetSceneId() int {
|
||||||
return int(this.SceneId)
|
return int(this.SceneId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetSceneId(sceneId int) {
|
func (this *Scene) SetSceneId(sceneId int) {
|
||||||
this.SceneId = int32(sceneId)
|
this.SceneId = int32(sceneId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGroupId() int32 {
|
func (this *Scene) GetGroupId() int32 {
|
||||||
return this.GroupId
|
return this.GroupId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGroupId(groupId int32) {
|
func (this *Scene) SetGroupId(groupId int32) {
|
||||||
this.GroupId = groupId
|
this.GroupId = groupId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetExtraData() interface{} {
|
func (this *Scene) GetExtraData() interface{} {
|
||||||
return this.ExtraData
|
return this.ExtraData
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetExtraData(data interface{}) {
|
func (this *Scene) SetExtraData(data interface{}) {
|
||||||
this.ExtraData = data
|
this.ExtraData = data
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetSceneState() SceneState {
|
func (this *Scene) GetSceneState() SceneState {
|
||||||
return this.SceneState
|
return this.SceneState
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetSceneState(state SceneState) {
|
func (this *Scene) SetSceneState(state SceneState) {
|
||||||
this.SceneState = state
|
this.SceneState = state
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGameId() int {
|
func (this *Scene) GetGameId() int {
|
||||||
return int(this.GameId)
|
return int(this.GameId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGameId(gameId int) {
|
func (this *Scene) SetGameId(gameId int) {
|
||||||
this.GameId = int32(gameId)
|
this.GameId = int32(gameId)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetPlayerNum() int {
|
func (this *Scene) GetPlayerNum() int {
|
||||||
return int(this.WGCreateScene.GetPlayerNum())
|
n := this.WGCreateScene.GetPlayerNum()
|
||||||
|
if n > 0 {
|
||||||
|
return int(n)
|
||||||
|
}
|
||||||
|
return int(this.PlayerNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetPlayerNum(playerNum int) {
|
func (this *Scene) SetPlayerNum(playerNum int) {
|
||||||
|
this.WGCreateScene.PlayerNum = int32(playerNum)
|
||||||
this.PlayerNum = int32(playerNum)
|
this.PlayerNum = int32(playerNum)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGameMode() int {
|
func (this *Scene) GetGameMode() int {
|
||||||
return int(this.GameMode)
|
return int(this.GameMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGameMode(gameMode int) {
|
func (this *Scene) SetGameMode(gameMode int) {
|
||||||
this.GameMode = int32(gameMode)
|
this.GameMode = int32(gameMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGaming() bool {
|
func (this *Scene) GetGaming() bool {
|
||||||
return this.Gaming
|
return this.Gaming
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGaming(gaming bool) {
|
func (this *Scene) SetGaming(gaming bool) {
|
||||||
this.Gaming = gaming
|
this.Gaming = gaming
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetTesting() bool {
|
func (this *Scene) GetTesting() bool {
|
||||||
return this.Testing
|
return this.Testing
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetTesting(testing bool) {
|
func (this *Scene) SetTesting(testing bool) {
|
||||||
this.Testing = testing
|
this.Testing = testing
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetCreator() int32 {
|
func (this *Scene) GetCreator() int32 {
|
||||||
return this.Creator
|
return this.Creator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetCreator(creator int32) {
|
func (this *Scene) SetCreator(creator int32) {
|
||||||
this.Creator = creator
|
this.Creator = creator
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetSceneMode() int {
|
func (this *Scene) GetSceneMode() int {
|
||||||
return int(this.SceneMode)
|
return int(this.SceneMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetSceneMode(sceneMode int) {
|
func (this *Scene) SetSceneMode(sceneMode int) {
|
||||||
this.SceneMode = int32(sceneMode)
|
this.SceneMode = int32(sceneMode)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetParams() []int64 {
|
func (this *Scene) GetParams() []int64 {
|
||||||
return this.Params
|
return this.Params
|
||||||
}
|
}
|
||||||
|
@ -236,42 +267,55 @@ func (this *Scene) GetParams() []int64 {
|
||||||
func (this *Scene) GetStateStartTime() time.Time {
|
func (this *Scene) GetStateStartTime() time.Time {
|
||||||
return this.StateStartTime
|
return this.StateStartTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetStateStartTime(stateStartTime time.Time) {
|
func (this *Scene) SetStateStartTime(stateStartTime time.Time) {
|
||||||
this.StateStartTime = stateStartTime
|
this.StateStartTime = stateStartTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGameStartTime() time.Time {
|
func (this *Scene) GetGameStartTime() time.Time {
|
||||||
return this.GameStartTime
|
return this.GameStartTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGameStartTime(gameStartTime time.Time) {
|
func (this *Scene) SetGameStartTime(gameStartTime time.Time) {
|
||||||
this.GameStartTime = gameStartTime
|
this.GameStartTime = gameStartTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetGameNowTime() time.Time {
|
func (this *Scene) GetGameNowTime() time.Time {
|
||||||
return this.GameNowTime
|
return this.GameNowTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetGameNowTime(gameNowTime time.Time) {
|
func (this *Scene) SetGameNowTime(gameNowTime time.Time) {
|
||||||
this.GameNowTime = gameNowTime
|
this.GameNowTime = gameNowTime
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetNumOfGames() int {
|
func (this *Scene) GetNumOfGames() int {
|
||||||
return this.NumOfGames
|
return this.NumOfGames
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetNumOfGames(numOfGames int) {
|
func (this *Scene) SetNumOfGames(numOfGames int) {
|
||||||
this.NumOfGames = numOfGames
|
this.NumOfGames = numOfGames
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetCpCtx() model.CoinPoolCtx {
|
func (this *Scene) GetCpCtx() model.CoinPoolCtx {
|
||||||
return this.CpCtx
|
return this.CpCtx
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetCpCtx(cpCtx model.CoinPoolCtx) {
|
func (this *Scene) SetCpCtx(cpCtx model.CoinPoolCtx) {
|
||||||
this.CpCtx = cpCtx
|
this.CpCtx = cpCtx
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetAudiences() map[int32]*Player {
|
func (this *Scene) GetAudiences() map[int32]*Player {
|
||||||
return this.audiences
|
return this.audiences
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetDisbandGen() int {
|
func (this *Scene) GetDisbandGen() int {
|
||||||
return this.disbandGen
|
return this.disbandGen
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) SetDisbandGen(disbandGen int) {
|
func (this *Scene) SetDisbandGen(disbandGen int) {
|
||||||
this.disbandGen = disbandGen
|
this.disbandGen = disbandGen
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) GetScenePolicy() ScenePolicy {
|
func (this *Scene) GetScenePolicy() ScenePolicy {
|
||||||
return this.sp
|
return this.sp
|
||||||
}
|
}
|
||||||
|
@ -1403,112 +1447,6 @@ func (this *Scene) ClearAutoPlayer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type GameDetailedParam struct {
|
|
||||||
Trend20Lately string //最近20局开奖结果
|
|
||||||
CtrlType int
|
|
||||||
PlayerPool map[int]int
|
|
||||||
CycleId string
|
|
||||||
}
|
|
||||||
|
|
||||||
// 保存详细游戏日志
|
|
||||||
func (this *Scene) SaveGameDetailedLog(logid string, gamedetailednote string, gameDetailedParam *GameDetailedParam) {
|
|
||||||
if this != nil {
|
|
||||||
if !this.Testing { //测试场屏蔽掉
|
|
||||||
trend20Lately := gameDetailedParam.Trend20Lately
|
|
||||||
baseScore := this.GetDBGameFree().GetBaseScore()
|
|
||||||
if common.IsLocalGame(int(this.GameId)) {
|
|
||||||
baseScore = this.BaseScore
|
|
||||||
}
|
|
||||||
if this.IsCoinScene() {
|
|
||||||
mapPlatform := make(map[string]bool)
|
|
||||||
for _, p := range this.Players {
|
|
||||||
if _, ok := mapPlatform[p.Platform]; !ok {
|
|
||||||
mapPlatform[p.Platform] = true
|
|
||||||
log := model.NewGameDetailedLogEx(logid, int32(this.GameId), int32(this.SceneId),
|
|
||||||
this.GetDBGameFree().GetGameMode(), this.GetDBGameFree().Id, int32(len(this.Players)),
|
|
||||||
int32(time.Now().Unix()-this.GameNowTime.Unix()), baseScore,
|
|
||||||
gamedetailednote, p.Platform, this.ClubId, this.RoomId, this.CpCtx, GameDetailedVer[int(this.GameId)], trend20Lately,
|
|
||||||
gameDetailedParam.CtrlType, gameDetailedParam.PlayerPool, gameDetailedParam.CycleId)
|
|
||||||
if log != nil {
|
|
||||||
if this.IsMatchScene() {
|
|
||||||
log.MatchId = this.GetMatch().GetMatchSortId()
|
|
||||||
}
|
|
||||||
if this.IsCustom() {
|
|
||||||
log.CycleId = this.CycleID
|
|
||||||
}
|
|
||||||
mq.Write(log)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
log := model.NewGameDetailedLogEx(logid, int32(this.GameId), int32(this.SceneId),
|
|
||||||
this.GetDBGameFree().GetGameMode(), this.GetDBGameFree().Id, int32(len(this.Players)),
|
|
||||||
int32(time.Now().Unix()-this.GameNowTime.Unix()), baseScore,
|
|
||||||
gamedetailednote, this.Platform, this.ClubId, this.RoomId, this.CpCtx, GameDetailedVer[int(this.GameId)], trend20Lately,
|
|
||||||
gameDetailedParam.CtrlType, gameDetailedParam.PlayerPool, gameDetailedParam.CycleId)
|
|
||||||
if log != nil {
|
|
||||||
if this.IsMatchScene() {
|
|
||||||
log.MatchId = this.GetMatch().GetMatchSortId()
|
|
||||||
}
|
|
||||||
if this.IsCustom() {
|
|
||||||
log.CycleId = this.CycleID
|
|
||||||
}
|
|
||||||
newLog := new(model.GameDetailedLog)
|
|
||||||
*newLog = *log
|
|
||||||
mq.Write(log)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type SaveGamePlayerListLogParam struct {
|
|
||||||
Platform string //平台
|
|
||||||
Channel string //渠道
|
|
||||||
Promoter string //推广员
|
|
||||||
PackageTag string //包标识
|
|
||||||
InviterId int32 //邀请人
|
|
||||||
LogId string //日志id
|
|
||||||
TotalIn int64 //总投入
|
|
||||||
TotalOut int64 //总产出
|
|
||||||
TaxCoin int64 //总税收
|
|
||||||
ClubPumpCoin int64 //俱乐部抽水
|
|
||||||
BetAmount int64 //下注量
|
|
||||||
WinAmountNoAnyTax int64 //税后赢取额(净利润,正负值)
|
|
||||||
ValidBet int64 //有效下注
|
|
||||||
ValidFlow int64 //有效流水
|
|
||||||
IsFirstGame bool //是否第一次游戏
|
|
||||||
IsLeave bool //是否中途离开,用于金花,德州可以中途离开游戏使用
|
|
||||||
IsFree bool //拉霸专用 是否免费
|
|
||||||
WinSmallGame int64 //拉霸专用 小游戏奖励
|
|
||||||
WinTotal int64 //拉霸专用 本局输赢
|
|
||||||
PlayerName string //玩家名字
|
|
||||||
CycleId string // 房卡场对局id
|
|
||||||
}
|
|
||||||
|
|
||||||
func GetSaveGamePlayerListLogParam(platform, channel, promoter, packageTag, logid string,
|
|
||||||
inviterId int32, totalin, totalout, taxCoin, clubPumpCoin, betAmount, winAmountNoAnyTax, validBet, validFlow int64,
|
|
||||||
isFirstGame, isLeave bool) *SaveGamePlayerListLogParam {
|
|
||||||
return &SaveGamePlayerListLogParam{
|
|
||||||
Platform: platform,
|
|
||||||
Channel: channel,
|
|
||||||
Promoter: promoter,
|
|
||||||
PackageTag: packageTag,
|
|
||||||
InviterId: inviterId,
|
|
||||||
LogId: logid,
|
|
||||||
TotalIn: totalin,
|
|
||||||
TotalOut: totalout,
|
|
||||||
TaxCoin: taxCoin,
|
|
||||||
ClubPumpCoin: clubPumpCoin,
|
|
||||||
BetAmount: betAmount,
|
|
||||||
WinAmountNoAnyTax: winAmountNoAnyTax,
|
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: isFirstGame,
|
|
||||||
IsLeave: isLeave,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (this *Scene) SaveFriendRecord(snid int32, isWin int32, billCoin int64, baseScore int32) {
|
func (this *Scene) SaveFriendRecord(snid int32, isWin int32, billCoin int64, baseScore int32) {
|
||||||
if this.SceneMode == common.SceneModePrivate {
|
if this.SceneMode == common.SceneModePrivate {
|
||||||
return
|
return
|
||||||
|
@ -1519,55 +1457,160 @@ func (this *Scene) SaveFriendRecord(snid int32, isWin int32, billCoin int64, bas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存玩家和GameDetailedLog的映射表
|
type SaveGameDetailedParam struct {
|
||||||
func (this *Scene) SaveGamePlayerListLog(snid int32, param *SaveGamePlayerListLogParam) {
|
LogId string // 日志id
|
||||||
if this != nil {
|
Detail string // 游戏详细信息
|
||||||
if !this.Testing { //测试场屏蔽掉 龙虎两边都压,totalin和totalout都=0,这个条件去掉
|
GameTime int64 // 游戏时长
|
||||||
//统计流水值
|
Trend20Lately string // 最近20局开奖结果
|
||||||
playerEx := this.GetPlayer(snid)
|
CtrlType int // 调控类型 1控赢 2控输
|
||||||
//有些结算的时候,玩家已经退场,不要用是否在游戏,0709,修改为扣税后数值
|
PlayerPool map[int]int // 个人水池分
|
||||||
if playerEx != nil && !param.IsLeave && !playerEx.IsRob && (param.IsFree || param.TotalIn != 0 || param.TotalOut != 0) {
|
}
|
||||||
totalFlow := param.ValidFlow * int64(this.GetDBGameFree().GetBetWaterRate()) / 100
|
|
||||||
playerEx.TotalConvertibleFlow += totalFlow
|
|
||||||
playerEx.TotalFlow += totalFlow
|
|
||||||
playerEx.ValidCacheBetTotal += param.ValidBet
|
|
||||||
//报表统计
|
|
||||||
//playerEx.SaveReportForm(int(this.GetDBGameFree().GetGameClass()), this.SceneMode, this.KeyGameId,
|
|
||||||
// param.WinAmountNoAnyTax, totalFlow, param.ValidBet)
|
|
||||||
//分配利润
|
|
||||||
ProfitDistribution(playerEx, param.TaxCoin, param.ClubPumpCoin, totalFlow)
|
|
||||||
//上报游戏事件
|
|
||||||
playerEx.ReportGameEvent(param.TaxCoin, param.ClubPumpCoin, param.WinAmountNoAnyTax, param.ValidBet, totalFlow, param.TotalIn, param.TotalOut)
|
|
||||||
}
|
|
||||||
|
|
||||||
roomType := int32(this.SceneMode)
|
func (this *Scene) SaveGameDetailedLog(param *SaveGameDetailedParam) {
|
||||||
if this.GameId == common.GameId_Avengers ||
|
if this == nil || param == nil {
|
||||||
this.GameId == common.GameId_CaiShen ||
|
return
|
||||||
this.GameId == common.GameId_EasterIsland ||
|
|
||||||
this.GameId == common.GameId_IceAge ||
|
|
||||||
this.GameId == common.GameId_TamQuoc { //复仇者联盟强制为0,所有场次操作记录放一起
|
|
||||||
roomType = 0
|
|
||||||
}
|
|
||||||
baseScore := this.GetDBGameFree().GetBaseScore()
|
|
||||||
if common.IsLocalGame(int(this.GameId)) {
|
|
||||||
baseScore = this.BaseScore
|
|
||||||
}
|
|
||||||
|
|
||||||
Name := param.PlayerName
|
|
||||||
if playerEx != nil {
|
|
||||||
Name = param.PlayerName
|
|
||||||
}
|
|
||||||
|
|
||||||
log := model.NewGamePlayerListLogEx(snid, param.LogId, param.Platform, param.Channel, param.Promoter, param.PackageTag,
|
|
||||||
this.GameId, baseScore, this.SceneId, int32(this.GetGameMode()),
|
|
||||||
this.GetGameFreeId(), param.TotalIn, param.TotalOut, this.ClubId, this.RoomId, param.TaxCoin, param.ClubPumpCoin, roomType,
|
|
||||||
param.BetAmount, param.WinAmountNoAnyTax, this.KeyGameId, Name, this.GetDBGameFree().GetGameClass(),
|
|
||||||
param.IsFirstGame, this.GetMatch().GetMatchSortId(), int64(this.GetMatch().GetMatchType()), param.IsFree, param.WinSmallGame, param.WinTotal, param.CycleId)
|
|
||||||
if log != nil {
|
|
||||||
mq.Write(log)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if param.GameTime < 0 {
|
||||||
|
param.GameTime = int64(time.Now().Sub(this.GameNowTime).Seconds())
|
||||||
|
}
|
||||||
|
|
||||||
|
if param.GameTime < 0 {
|
||||||
|
param.GameTime = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
now := time.Now()
|
||||||
|
|
||||||
|
f := func(plt string) {
|
||||||
|
log := &model.GameDetailedLog{
|
||||||
|
Id: bson.NewObjectId(),
|
||||||
|
LogId: param.LogId,
|
||||||
|
GameId: this.GameId,
|
||||||
|
Platform: plt,
|
||||||
|
MatchId: this.GetMatch().GetMatchSortId(),
|
||||||
|
SceneId: this.SceneId,
|
||||||
|
GameMode: this.GameMode,
|
||||||
|
GameFreeid: this.GetGameFreeId(),
|
||||||
|
PlayerCount: int32(len(this.Players)),
|
||||||
|
GameTiming: int32(param.GameTime),
|
||||||
|
GameBaseBet: this.GetBaseScore(),
|
||||||
|
GameDetailedNote: param.Detail,
|
||||||
|
GameDetailVer: GameDetailedVer[int(this.GameId)],
|
||||||
|
CpCtx: this.CpCtx,
|
||||||
|
Time: now,
|
||||||
|
Trend20Lately: param.Trend20Lately,
|
||||||
|
Ts: now.Unix(),
|
||||||
|
CtrlType: param.CtrlType,
|
||||||
|
PlayerPool: make(map[int]int),
|
||||||
|
CycleId: this.CycleID,
|
||||||
|
}
|
||||||
|
for k, v := range param.PlayerPool {
|
||||||
|
log.PlayerPool[k] = v
|
||||||
|
}
|
||||||
|
mq.Write(log)
|
||||||
|
}
|
||||||
|
|
||||||
|
switch {
|
||||||
|
case this.IsCoinScene():
|
||||||
|
mapPlatform := make(map[string]bool)
|
||||||
|
for _, v := range this.Players {
|
||||||
|
if v == nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
if _, ok := mapPlatform[v.Platform]; ok {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
mapPlatform[v.Platform] = true
|
||||||
|
f(v.Platform)
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
f(this.Platform)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type SaveGamePlayerListLogParam struct {
|
||||||
|
LogId string // 详情日志id
|
||||||
|
Platform string // 平台
|
||||||
|
Snid int32 // 玩家id
|
||||||
|
PlayerName string // 玩家名字
|
||||||
|
Channel string // 渠道
|
||||||
|
ChannelId string // 推广渠道
|
||||||
|
TotalIn int64 // 总投入
|
||||||
|
TotalOut int64 // 总产出(税前)
|
||||||
|
TaxCoin int64 // 总税收
|
||||||
|
BetAmount int64 // 下注量
|
||||||
|
WinAmountNoAnyTax int64 // 税后赢取额(净利润,正负值)
|
||||||
|
IsFirstGame bool // 是否第一次游戏
|
||||||
|
IsFree bool // 拉霸专用 是否免费
|
||||||
|
WinSmallGame int64 // 拉霸专用 小游戏奖励
|
||||||
|
WinTotal int64 // 拉霸专用 本局输赢
|
||||||
|
GameTime int64 // 游戏时长
|
||||||
|
}
|
||||||
|
|
||||||
|
// SaveGamePlayerListLog 保存玩家对局记录
|
||||||
|
func (this *Scene) SaveGamePlayerListLog(param *SaveGamePlayerListLogParam) {
|
||||||
|
if this == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if param == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
p := this.GetPlayer(param.Snid)
|
||||||
|
if p == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if param.PlayerName == "" {
|
||||||
|
param.PlayerName = p.Name
|
||||||
|
}
|
||||||
|
|
||||||
|
baseScore := this.GetBaseScore()
|
||||||
|
|
||||||
|
// 上报玩家游戏记录
|
||||||
|
if !p.IsRob && (param.IsFree || param.TotalIn != 0 || param.TotalOut != 0) {
|
||||||
|
p.ReportGameEvent(&ReportGameEventParam{
|
||||||
|
Tax: param.TaxCoin,
|
||||||
|
Change: param.WinAmountNoAnyTax,
|
||||||
|
In: param.TotalIn,
|
||||||
|
Out: param.TotalOut,
|
||||||
|
GameTime: param.GameTime,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存玩家游戏日志
|
||||||
|
now := time.Now()
|
||||||
|
log := &model.GamePlayerListLog{
|
||||||
|
LogId: bson.NewObjectId(),
|
||||||
|
SnId: p.SnId,
|
||||||
|
Name: param.PlayerName,
|
||||||
|
GameId: this.GameId,
|
||||||
|
BaseScore: baseScore,
|
||||||
|
TaxCoin: param.TaxCoin,
|
||||||
|
Platform: param.Platform,
|
||||||
|
Channel: param.Channel,
|
||||||
|
SceneId: this.SceneId,
|
||||||
|
GameMode: this.GameMode,
|
||||||
|
GameFreeid: this.GetGameFreeId(),
|
||||||
|
GameDetailedLogId: param.LogId,
|
||||||
|
IsFirstGame: param.IsFirstGame,
|
||||||
|
BetAmount: param.BetAmount,
|
||||||
|
WinAmountNoAnyTax: param.WinAmountNoAnyTax,
|
||||||
|
TotalIn: param.TotalIn,
|
||||||
|
TotalOut: param.TotalOut,
|
||||||
|
Time: now,
|
||||||
|
RoomType: this.SceneMode,
|
||||||
|
GameDif: this.GetDBGameFree().GetGameDif(),
|
||||||
|
GameClass: this.GetDBGameFree().GetGameClass(),
|
||||||
|
MatchId: this.GetMatch().GetMatchSortId(),
|
||||||
|
MatchType: int64(this.GetMatch().GetMatchType()),
|
||||||
|
Ts: now.Unix(),
|
||||||
|
IsFree: param.IsFree,
|
||||||
|
WinSmallGame: param.WinSmallGame,
|
||||||
|
WinTotal: param.WinTotal,
|
||||||
|
CycleId: this.CycleID,
|
||||||
|
}
|
||||||
|
mq.Write(log)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Scene) IsPlayerFirst(p *Player) bool {
|
func (this *Scene) IsPlayerFirst(p *Player) bool {
|
||||||
|
|
|
@ -1023,31 +1023,31 @@ func CaiShenCheckAndSaveLog(sceneEx *CaiShenSceneData, playerEx *CaiShenPlayerDa
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||||
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
||||||
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
||||||
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
||||||
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
||||||
}
|
GameTime: 1,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -767,6 +767,7 @@ func (e *SceneEx) ToBilled(p1, p2 *PlayerEx, isWin int) (*chesstitians.Chesstiti
|
||||||
UserIcon: p1.Head,
|
UserIcon: p1.Head,
|
||||||
Platform: p1.Platform,
|
Platform: p1.Platform,
|
||||||
Channel: p1.Channel,
|
Channel: p1.Channel,
|
||||||
|
ChannelId: p1.ChannelId,
|
||||||
Promoter: p1.BeUnderAgentCode,
|
Promoter: p1.BeUnderAgentCode,
|
||||||
PackageTag: p1.PackageID,
|
PackageTag: p1.PackageID,
|
||||||
InviterId: p1.InviterId,
|
InviterId: p1.InviterId,
|
||||||
|
|
|
@ -1298,9 +1298,6 @@ func (this *SceneStateBilled) OnEnter(s *base.Scene) {
|
||||||
} else {
|
} else {
|
||||||
totalout += (o_player.GainCoin + o_player.GainTaxCoin)
|
totalout += (o_player.GainCoin + o_player.GainTaxCoin)
|
||||||
}
|
}
|
||||||
|
|
||||||
validFlow := totalin + totalout
|
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
sceneEx.SaveFriendRecord(o_player.UserId, o_player.IsWin, o_player.GainCoin, sceneEx.GetBaseScore())
|
sceneEx.SaveFriendRecord(o_player.UserId, o_player.IsWin, o_player.GainCoin, sceneEx.GetBaseScore())
|
||||||
|
|
||||||
// 游戏数据统计
|
// 游戏数据统计
|
||||||
|
@ -1313,16 +1310,29 @@ func (this *SceneStateBilled) OnEnter(s *base.Scene) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 玩家游戏记录
|
// 玩家游戏记录
|
||||||
sceneEx.SaveGamePlayerListLog(o_player.UserId,
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
LogId: logid,
|
||||||
o_player.PackageTag, logid, o_player.InviterId, totalin, totalout, o_player.GainTaxCoin,
|
Platform: o_player.Platform,
|
||||||
0, 0, o_player.GainCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave))
|
Snid: o_player.UserId,
|
||||||
|
PlayerName: "",
|
||||||
|
Channel: o_player.Channel,
|
||||||
|
ChannelId: o_player.ChannelId,
|
||||||
|
TotalIn: totalin,
|
||||||
|
TotalOut: totalout,
|
||||||
|
TaxCoin: o_player.GainTaxCoin,
|
||||||
|
BetAmount: 0,
|
||||||
|
WinAmountNoAnyTax: o_player.GainCoin,
|
||||||
|
IsFirstGame: o_player.IsFirst,
|
||||||
|
})
|
||||||
isSave = true
|
isSave = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if isSave {
|
if isSave {
|
||||||
// 牌局记录
|
// 牌局记录
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sceneEx.NotifySceneRoundPause()
|
sceneEx.NotifySceneRoundPause()
|
||||||
|
|
|
@ -781,34 +781,28 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
sceneEx.logid, _ = model.AutoIncGameLogId()
|
sceneEx.logid, _ = model.AutoIncGameLogId()
|
||||||
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: sceneEx.logid,
|
||||||
|
Detail: info,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
TotalBetValue := 0
|
TotalBetValue := 0
|
||||||
totalin := int64(TotalBetValue)
|
totalin := int64(TotalBetValue)
|
||||||
totalout := playerEx.gainCoin
|
totalout := playerEx.gainCoin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
LogId: sceneEx.logid,
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
Platform: playerEx.Platform,
|
||||||
Platform: playerEx.Platform,
|
Snid: playerEx.SnId,
|
||||||
Channel: playerEx.Channel,
|
PlayerName: playerEx.Name,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Channel: playerEx.Channel,
|
||||||
PackageTag: playerEx.PackageID,
|
ChannelId: playerEx.ChannelId,
|
||||||
InviterId: playerEx.InviterId,
|
TotalIn: totalin,
|
||||||
LogId: sceneEx.logid,
|
TotalOut: totalout,
|
||||||
TotalIn: totalin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
TotalOut: totalout,
|
BetAmount: int64(TotalBetValue),
|
||||||
TaxCoin: playerEx.taxCoin,
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
BetAmount: int64(TotalBetValue),
|
})
|
||||||
WinAmountNoAnyTax: playerEx.gainCoin,
|
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
|
||||||
IsFree: false,
|
|
||||||
WinSmallGame: 0,
|
|
||||||
WinTotal: 0,
|
|
||||||
}
|
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
playerEx.lastIsWin = playerEx.IsWin
|
playerEx.lastIsWin = playerEx.IsWin
|
||||||
|
|
|
@ -892,31 +892,31 @@ func EasterIslandCheckAndSaveLog(sceneEx *EasterIslandSceneData, playerEx *Easte
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||||
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
||||||
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
||||||
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
||||||
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
||||||
}
|
GameTime: 1,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,13 +262,24 @@ func (this *FishingPlayerData) SaveDetailedLog(s *base.Scene) {
|
||||||
info, err := model.MarshalGameNoteByFISH(&fd)
|
info, err := model.MarshalGameNoteByFISH(&fd)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
LogId: logid,
|
||||||
param := base.GetSaveGamePlayerListLogParam(this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, logid,
|
Platform: this.Platform,
|
||||||
this.InviterId, totalin, totalout, int64(this.sTaxCoin), 0, totalin,
|
Snid: this.SnId,
|
||||||
totalout, validFlow, validBet, sceneEx.IsPlayerFirst(this.Player), false)
|
PlayerName: this.Name,
|
||||||
sceneEx.SaveGamePlayerListLog(this.SnId, param)
|
Channel: this.Channel,
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
ChannelId: this.ChannelId,
|
||||||
|
TotalIn: totalin,
|
||||||
|
TotalOut: totalout,
|
||||||
|
TaxCoin: int64(this.sTaxCoin),
|
||||||
|
BetAmount: totalin,
|
||||||
|
WinAmountNoAnyTax: totalout,
|
||||||
|
IsFirstGame: sceneEx.IsPlayerFirst(this.Player),
|
||||||
|
})
|
||||||
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pack := &server_proto.GWFishRecord{
|
pack := &server_proto.GWFishRecord{
|
||||||
|
|
|
@ -512,7 +512,11 @@ func FortuneDragonAndSaveLog(sceneEx *FortuneDragonSceneData, playerEx *FortuneD
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
var totalin, totalout int64
|
var totalin, totalout int64
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalin = playerEx.totalBet
|
totalin = playerEx.totalBet
|
||||||
|
@ -520,25 +524,22 @@ func FortuneDragonAndSaveLog(sceneEx *FortuneDragonSceneData, playerEx *FortuneD
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: totalin,
|
BetAmount: totalin,
|
||||||
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
}
|
IsFree: playerEx.isFree,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
GameTime: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,11 @@ func FortuneOxAndSaveLog(sceneEx *FortuneOxSceneData, playerEx *FortuneOxPlayerD
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
var totalin, totalout int64
|
var totalin, totalout int64
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalin = playerEx.totalBet
|
totalin = playerEx.totalBet
|
||||||
|
@ -525,25 +529,22 @@ func FortuneOxAndSaveLog(sceneEx *FortuneOxSceneData, playerEx *FortuneOxPlayerD
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: playerEx.totalBet,
|
BetAmount: totalin,
|
||||||
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
}
|
IsFree: totalin == 0,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
GameTime: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -511,7 +511,11 @@ func FortuneRabbitAndSaveLog(sceneEx *FortuneRabbitSceneData, playerEx *FortuneR
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
var totalin, totalout int64
|
var totalin, totalout int64
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalin = playerEx.totalBet
|
totalin = playerEx.totalBet
|
||||||
|
@ -519,25 +523,22 @@ func FortuneRabbitAndSaveLog(sceneEx *FortuneRabbitSceneData, playerEx *FortuneR
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: playerEx.totalBet,
|
BetAmount: totalin,
|
||||||
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
}
|
IsFree: playerEx.isFree,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
GameTime: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -514,7 +514,11 @@ func FortuneTigerAndSaveLog(sceneEx *FortuneTigerSceneData, playerEx *FortuneTig
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
var totalin, totalout int64
|
var totalin, totalout int64
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalin = playerEx.totalBet
|
totalin = playerEx.totalBet
|
||||||
|
@ -522,25 +526,22 @@ func FortuneTigerAndSaveLog(sceneEx *FortuneTigerSceneData, playerEx *FortuneTig
|
||||||
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 3 || data.Results[0].FreeNumMax == 0 {
|
||||||
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
totalout = int64(data.RoundReward) + playerEx.taxCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: playerEx.totalBet,
|
BetAmount: totalin,
|
||||||
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
WinAmountNoAnyTax: totalout - totalin - playerEx.taxCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
}
|
IsFree: totalin == 0,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
GameTime: 1,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -326,7 +326,11 @@ func (s *FruitsSceneData) SaveLog(p *FruitsPlayerData, isOffline int) {
|
||||||
info, err := model.MarshalGameNoteByROLL(&FruitsType)
|
info, err := model.MarshalGameNoteByROLL(&FruitsType)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logId, _ := model.AutoIncGameLogId()
|
logId, _ := model.AutoIncGameLogId()
|
||||||
s.SaveGameDetailedLog(logId, info, &base.GameDetailedParam{})
|
s.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logId,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
//水池上下文环境s
|
//水池上下文环境s
|
||||||
s.CpCtx = p.cpCtx
|
s.CpCtx = p.cpCtx
|
||||||
var totalIn, totalOut int64
|
var totalIn, totalOut int64
|
||||||
|
@ -336,22 +340,22 @@ func (s *FruitsSceneData) SaveLog(p *FruitsPlayerData, isOffline int) {
|
||||||
if nowGetCoin > 0 && isF {
|
if nowGetCoin > 0 && isF {
|
||||||
totalOut = p.Coin - p.startCoin + betCoin /*+ p.taxCoin*/
|
totalOut = p.Coin - p.startCoin + betCoin /*+ p.taxCoin*/
|
||||||
}
|
}
|
||||||
s.SaveGamePlayerListLog(p.SnId,
|
s.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
&base.SaveGamePlayerListLogParam{
|
LogId: logId,
|
||||||
Platform: p.Platform,
|
Platform: p.Platform,
|
||||||
Channel: p.Channel,
|
Snid: p.SnId,
|
||||||
Promoter: p.BeUnderAgentCode,
|
PlayerName: p.Name,
|
||||||
PackageTag: p.PackageID,
|
Channel: p.Channel,
|
||||||
InviterId: p.InviterId,
|
ChannelId: p.ChannelId,
|
||||||
LogId: logId,
|
TotalIn: totalIn,
|
||||||
TotalIn: totalIn,
|
TotalOut: totalOut,
|
||||||
TotalOut: totalOut,
|
TaxCoin: p.taxCoin,
|
||||||
TaxCoin: p.taxCoin,
|
BetAmount: totalIn,
|
||||||
ClubPumpCoin: 0,
|
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
||||||
BetAmount: totalIn,
|
IsFirstGame: s.IsPlayerFirst(p.Player),
|
||||||
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
IsFree: totalIn == 0,
|
||||||
IsFirstGame: s.IsPlayerFirst(p.Player),
|
GameTime: 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
s.GameNowTime = time.Now()
|
s.GameNowTime = time.Now()
|
||||||
if s.CheckNeedDestroy() && p.freeTimes == 0 && p.maryFreeTimes == 0 {
|
if s.CheckNeedDestroy() && p.freeTimes == 0 && p.maryFreeTimes == 0 {
|
||||||
|
|
|
@ -942,31 +942,31 @@ func IceAgeCheckAndSaveLog(sceneEx *IceAgeSceneData, playerEx *IceAgePlayerData)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||||
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
||||||
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
||||||
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
||||||
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
||||||
}
|
GameTime: 1,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,7 +348,11 @@ func (s *RichBlessedSceneData) SaveLog(p *RichBlessedPlayerData, isOffline int)
|
||||||
info, err := model.MarshalGameNoteByROLL(&RichBlessed)
|
info, err := model.MarshalGameNoteByROLL(&RichBlessed)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logId, _ := model.AutoIncGameLogId()
|
logId, _ := model.AutoIncGameLogId()
|
||||||
s.SaveGameDetailedLog(logId, info, &base.GameDetailedParam{})
|
s.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logId,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
//水池上下文环境s
|
//水池上下文环境s
|
||||||
s.CpCtx = p.cpCtx
|
s.CpCtx = p.cpCtx
|
||||||
var totalIn, totalOut int64
|
var totalIn, totalOut int64
|
||||||
|
@ -358,22 +362,22 @@ func (s *RichBlessedSceneData) SaveLog(p *RichBlessedPlayerData, isOffline int)
|
||||||
if nowGetCoin > 0 {
|
if nowGetCoin > 0 {
|
||||||
totalOut = p.Coin - p.startCoin + betCoin /*+ p.taxCoin*/
|
totalOut = p.Coin - p.startCoin + betCoin /*+ p.taxCoin*/
|
||||||
}
|
}
|
||||||
s.SaveGamePlayerListLog(p.SnId,
|
s.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
&base.SaveGamePlayerListLogParam{
|
LogId: logId,
|
||||||
Platform: p.Platform,
|
Platform: p.Platform,
|
||||||
Channel: p.Channel,
|
Snid: p.SnId,
|
||||||
Promoter: p.BeUnderAgentCode,
|
PlayerName: p.Name,
|
||||||
PackageTag: p.PackageID,
|
Channel: p.Channel,
|
||||||
InviterId: p.InviterId,
|
ChannelId: p.ChannelId,
|
||||||
LogId: logId,
|
TotalIn: totalIn,
|
||||||
TotalIn: totalIn,
|
TotalOut: totalOut,
|
||||||
TotalOut: totalOut,
|
TaxCoin: p.taxCoin,
|
||||||
TaxCoin: p.taxCoin,
|
BetAmount: totalIn,
|
||||||
ClubPumpCoin: 0,
|
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
||||||
BetAmount: totalIn,
|
IsFirstGame: s.IsPlayerFirst(p.Player),
|
||||||
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
IsFree: totalIn == 0,
|
||||||
IsFirstGame: s.IsPlayerFirst(p.Player),
|
GameTime: 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
s.GameNowTime = time.Now()
|
s.GameNowTime = time.Now()
|
||||||
if s.CheckNeedDestroy() && p.freeTimes == 0 {
|
if s.CheckNeedDestroy() && p.freeTimes == 0 {
|
||||||
|
|
|
@ -33,6 +33,7 @@ type PlayerData struct {
|
||||||
|
|
||||||
Platform string //平台
|
Platform string //平台
|
||||||
Channel string //渠道信息
|
Channel string //渠道信息
|
||||||
|
ChannelId string
|
||||||
PackageID string //推广包标识 对应客户端的packagetag
|
PackageID string //推广包标识 对应客户端的packagetag
|
||||||
flag int
|
flag int
|
||||||
}
|
}
|
||||||
|
@ -333,6 +334,7 @@ func (this *SceneEx) BackupPlayer(p *PlayerEx, isBilled bool) {
|
||||||
flag: p.GetFlag(),
|
flag: p.GetFlag(),
|
||||||
Platform: p.Platform,
|
Platform: p.Platform,
|
||||||
Channel: p.Channel,
|
Channel: p.Channel,
|
||||||
|
ChannelId: p.ChannelId,
|
||||||
PackageID: p.PackageID,
|
PackageID: p.PackageID,
|
||||||
CurIsWin: p.CurIsWin,
|
CurIsWin: p.CurIsWin,
|
||||||
Name: p.Name,
|
Name: p.Name,
|
||||||
|
|
|
@ -1166,33 +1166,28 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
if !playerEx.IsRob {
|
if !playerEx.IsRob {
|
||||||
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: sceneEx.logid,
|
||||||
|
Detail: info,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
totalin := int64(TotalBetValue)
|
totalin := int64(TotalBetValue)
|
||||||
totalout := playerEx.gainCoin
|
totalout := playerEx.gainCoin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: sceneEx.logid,
|
LogId: sceneEx.logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(TotalBetValue),
|
BetAmount: int64(TotalBetValue),
|
||||||
WinAmountNoAnyTax: playerEx.gainCoin,
|
WinAmountNoAnyTax: playerEx.gainCoin,
|
||||||
ValidBet: validBet,
|
IsFirstGame: s.IsPlayerFirst(playerEx.Player),
|
||||||
ValidFlow: validFlow,
|
})
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
|
||||||
IsFree: false,
|
|
||||||
WinSmallGame: 0,
|
|
||||||
WinTotal: 0,
|
|
||||||
}
|
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1248,34 +1243,30 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
if !playerEx.IsRob {
|
if !playerEx.IsRob {
|
||||||
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
info, err := model.MarshalGameNoteByHUNDRED(LogBaseResult)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: sceneEx.logid,
|
||||||
|
Detail: info,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
totalin := int64(TotalBetValue)
|
totalin := int64(TotalBetValue)
|
||||||
totalout := playerEx.gainCoin
|
totalout := playerEx.gainCoin
|
||||||
validFlow := totalin + totalout
|
//validFlow := totalin + totalout
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
//validBet := common.AbsI64(totalin - totalout)
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: sceneEx.logid,
|
LogId: sceneEx.logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(TotalBetValue),
|
BetAmount: int64(TotalBetValue),
|
||||||
WinAmountNoAnyTax: playerEx.gainCoin,
|
WinAmountNoAnyTax: playerEx.gainCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: playerEx.IsPlayerFirst,
|
IsFirstGame: playerEx.IsPlayerFirst,
|
||||||
IsFree: false,
|
})
|
||||||
WinSmallGame: 0,
|
|
||||||
WinTotal: 0,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
}
|
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -778,31 +778,31 @@ func TamQuocCheckAndSaveLog(sceneEx *TamQuocSceneData, playerEx *TamQuocPlayerDa
|
||||||
if err == nil {
|
if err == nil {
|
||||||
logid, _ := model.AutoIncGameLogId()
|
logid, _ := model.AutoIncGameLogId()
|
||||||
playerEx.currentLogId = logid
|
playerEx.currentLogId = logid
|
||||||
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: logid,
|
||||||
|
Detail: info,
|
||||||
|
GameTime: 1,
|
||||||
|
})
|
||||||
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
totalin := int64(playerEx.RollGameType.BaseResult.TotalBet)
|
||||||
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
totalout := playerEx.RollGameType.BaseResult.ChangeCoin + playerEx.taxCoin + totalin
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
logParam := &base.SaveGamePlayerListLogParam{
|
|
||||||
Platform: playerEx.Platform,
|
|
||||||
Channel: playerEx.Channel,
|
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
|
||||||
PackageTag: playerEx.PackageID,
|
|
||||||
InviterId: playerEx.InviterId,
|
|
||||||
LogId: logid,
|
LogId: logid,
|
||||||
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
BetAmount: int64(playerEx.RollGameType.BaseResult.TotalBet),
|
||||||
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
WinAmountNoAnyTax: playerEx.RollGameType.BaseResult.ChangeCoin,
|
||||||
ValidBet: validBet,
|
|
||||||
ValidFlow: validFlow,
|
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
IsFree: playerEx.RollGameType.BaseResult.IsFree,
|
||||||
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
WinSmallGame: playerEx.RollGameType.BaseResult.WinSmallGame,
|
||||||
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
WinTotal: playerEx.RollGameType.BaseResult.WinTotal,
|
||||||
}
|
GameTime: 1,
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,11 +181,22 @@ func (this *PolicyThirteen) OnPlayerLeave(s *base.Scene, p *base.Player, reason
|
||||||
} else {
|
} else {
|
||||||
totalin -= playerEx.gainCoin
|
totalin -= playerEx.gainCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
//validFlow := totalin + totalout
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
//validBet := common.AbsI64(totalin - totalout)
|
||||||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, base.GetSaveGamePlayerListLogParam(playerEx.Platform, playerEx.Channel, playerEx.BeUnderAgentCode,
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
playerEx.PackageID, sceneEx.logid, playerEx.InviterId, totalin, totalout, playerEx.taxCoin,
|
LogId: sceneEx.logid,
|
||||||
0, 0, playerEx.gainCoin, validBet, validFlow, sceneEx.IsPlayerFirst(sceneEx.GetPlayer(playerEx.SnId)), false))
|
Platform: playerEx.Platform,
|
||||||
|
Snid: playerEx.SnId,
|
||||||
|
PlayerName: playerEx.Name,
|
||||||
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
|
TotalIn: totalin,
|
||||||
|
TotalOut: totalout,
|
||||||
|
TaxCoin: playerEx.taxCoin,
|
||||||
|
BetAmount: 0,
|
||||||
|
WinAmountNoAnyTax: playerEx.gainCoin,
|
||||||
|
IsFirstGame: sceneEx.IsPlayerFirst(sceneEx.GetPlayer(playerEx.SnId)),
|
||||||
|
})
|
||||||
|
|
||||||
sceneEx.Statistics(&base.StaticParam{
|
sceneEx.Statistics(&base.StaticParam{
|
||||||
SnId: playerEx.SnId,
|
SnId: playerEx.SnId,
|
||||||
|
@ -1390,11 +1401,20 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
} else {
|
} else {
|
||||||
totalin -= o_player.gainCoin
|
totalin -= o_player.gainCoin
|
||||||
}
|
}
|
||||||
validFlow := totalin + totalout
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
LogId: sceneEx.logid,
|
||||||
sceneEx.SaveGamePlayerListLog(o_player.SnId, base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.BeUnderAgentCode,
|
Platform: o_player.Platform,
|
||||||
o_player.PackageID, sceneEx.logid, o_player.InviterId, totalin, totalout, o_player.taxCoin,
|
Snid: o_player.SnId,
|
||||||
0, 0, o_player.gainCoin, validBet, validFlow, p.IsFirst, false))
|
PlayerName: o_player.Name,
|
||||||
|
Channel: o_player.Channel,
|
||||||
|
ChannelId: o_player.ChannelId,
|
||||||
|
TotalIn: totalin,
|
||||||
|
TotalOut: totalout,
|
||||||
|
TaxCoin: o_player.taxCoin,
|
||||||
|
BetAmount: 0,
|
||||||
|
WinAmountNoAnyTax: o_player.gainCoin,
|
||||||
|
IsFirstGame: p.IsFirst,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1453,10 +1473,11 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
thirteenWaterType.PlayerCount = len(person)
|
thirteenWaterType.PlayerCount = len(person)
|
||||||
info, err := model.MarshalGameNoteByFIGHT(&thirteenWaterType)
|
info, err := model.MarshalGameNoteByFIGHT(&thirteenWaterType)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
Trend20Lately: "",
|
LogId: sceneEx.logid,
|
||||||
CtrlType: sceneEx.ctrlType,
|
Detail: info,
|
||||||
PlayerPool: playerPool,
|
CtrlType: sceneEx.ctrlType,
|
||||||
|
PlayerPool: playerPool,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1737,6 +1737,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: playerEx.Head,
|
UserIcon: playerEx.Head,
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
PackageTag: playerEx.PackageID,
|
PackageTag: playerEx.PackageID,
|
||||||
InviterId: playerEx.InviterId,
|
InviterId: playerEx.InviterId,
|
||||||
|
@ -1888,6 +1889,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: losePlayer.Head,
|
UserIcon: losePlayer.Head,
|
||||||
Platform: losePlayer.Platform,
|
Platform: losePlayer.Platform,
|
||||||
Channel: losePlayer.Channel,
|
Channel: losePlayer.Channel,
|
||||||
|
ChannelId: losePlayer.ChannelId,
|
||||||
Promoter: losePlayer.BeUnderAgentCode,
|
Promoter: losePlayer.BeUnderAgentCode,
|
||||||
PackageTag: losePlayer.PackageID,
|
PackageTag: losePlayer.PackageID,
|
||||||
InviterId: losePlayer.InviterId,
|
InviterId: losePlayer.InviterId,
|
||||||
|
@ -2030,6 +2032,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: lastWinPlayer.Head,
|
UserIcon: lastWinPlayer.Head,
|
||||||
Platform: lastWinPlayer.Platform,
|
Platform: lastWinPlayer.Platform,
|
||||||
Channel: lastWinPlayer.Channel,
|
Channel: lastWinPlayer.Channel,
|
||||||
|
ChannelId: lastWinPlayer.ChannelId,
|
||||||
Promoter: lastWinPlayer.BeUnderAgentCode,
|
Promoter: lastWinPlayer.BeUnderAgentCode,
|
||||||
PackageTag: lastWinPlayer.PackageID,
|
PackageTag: lastWinPlayer.PackageID,
|
||||||
InviterId: lastWinPlayer.InviterId,
|
InviterId: lastWinPlayer.InviterId,
|
||||||
|
@ -2141,6 +2144,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: playerEx.Head,
|
UserIcon: playerEx.Head,
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
PackageTag: playerEx.PackageID,
|
PackageTag: playerEx.PackageID,
|
||||||
InviterId: playerEx.InviterId,
|
InviterId: playerEx.InviterId,
|
||||||
|
@ -2246,6 +2250,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: playerEx.Head,
|
UserIcon: playerEx.Head,
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
PackageTag: playerEx.PackageID,
|
PackageTag: playerEx.PackageID,
|
||||||
InviterId: playerEx.InviterId,
|
InviterId: playerEx.InviterId,
|
||||||
|
@ -2397,6 +2402,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: playerEx.Head,
|
UserIcon: playerEx.Head,
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
PackageTag: playerEx.PackageID,
|
PackageTag: playerEx.PackageID,
|
||||||
InviterId: playerEx.InviterId,
|
InviterId: playerEx.InviterId,
|
||||||
|
@ -2527,6 +2533,7 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
UserIcon: playerEx.Head,
|
UserIcon: playerEx.Head,
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
|
ChannelId: playerEx.ChannelId,
|
||||||
Promoter: playerEx.BeUnderAgentCode,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
PackageTag: playerEx.PackageID,
|
PackageTag: playerEx.PackageID,
|
||||||
InviterId: playerEx.InviterId,
|
InviterId: playerEx.InviterId,
|
||||||
|
@ -2729,8 +2736,6 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
playerEx.UpdatePigBankCoin(o_player.GainCoin)
|
playerEx.UpdatePigBankCoin(o_player.GainCoin)
|
||||||
}
|
}
|
||||||
|
|
||||||
validFlow := totalin + totalout
|
|
||||||
validBet := common.AbsI64(totalin - totalout)
|
|
||||||
sceneEx.SaveFriendRecord(o_player.UserId, o_player.IsWin, o_player.BillCoin, sceneEx.GetBaseScore())
|
sceneEx.SaveFriendRecord(o_player.UserId, o_player.IsWin, o_player.BillCoin, sceneEx.GetBaseScore())
|
||||||
|
|
||||||
// 玩家数据统计
|
// 玩家数据统计
|
||||||
|
@ -2752,20 +2757,29 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 保存玩家游戏记录
|
// 保存玩家游戏记录
|
||||||
param := base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
||||||
o_player.PackageTag, sceneEx.recordId, o_player.InviterId, totalin, totalout, o_player.BillTaxCoin,
|
LogId: sceneEx.recordId,
|
||||||
0, 0, o_player.GainCoin+o_player.BombCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave)
|
Platform: o_player.Platform,
|
||||||
param.CycleId = sceneEx.CycleID
|
Snid: o_player.UserId,
|
||||||
sceneEx.SaveGamePlayerListLog(o_player.UserId, param)
|
Channel: o_player.Channel,
|
||||||
|
ChannelId: o_player.ChannelId,
|
||||||
|
TotalIn: totalin,
|
||||||
|
TotalOut: totalout,
|
||||||
|
TaxCoin: o_player.BillTaxCoin,
|
||||||
|
BetAmount: 0,
|
||||||
|
WinAmountNoAnyTax: o_player.GainCoin + o_player.BombCoin,
|
||||||
|
IsFirstGame: o_player.IsFirst,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if isSave {
|
if isSave {
|
||||||
// 牌局记录
|
// 牌局记录
|
||||||
sceneEx.SaveGameDetailedLog(sceneEx.recordId, info, &base.GameDetailedParam{
|
sceneEx.SaveGameDetailedLog(&base.SaveGameDetailedParam{
|
||||||
|
LogId: sceneEx.recordId,
|
||||||
|
Detail: info,
|
||||||
Trend20Lately: "",
|
Trend20Lately: "",
|
||||||
CtrlType: sceneEx.ctrlType,
|
CtrlType: sceneEx.ctrlType,
|
||||||
PlayerPool: tienlenType.PlayerPool,
|
PlayerPool: tienlenType.PlayerPool,
|
||||||
CycleId: sceneEx.CycleID,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,49 +275,6 @@ type PlayerGameRecEvent struct {
|
||||||
ChannelId string //推广渠道id
|
ChannelId string //推广渠道id
|
||||||
}
|
}
|
||||||
|
|
||||||
func CreatePlayerGameRecEvent(snid int32, tax, taxex, amount, validbet, validflow, in, out int64, gameid, gameFreeId, modeid int32, recordId, channel, channelId, promoter,
|
|
||||||
platform, city, os string, createDayTime time.Time, gamingTime int32, firstGameFreeTime, firstGameTime time.Time,
|
|
||||||
playGameFreeTimes, playerGameTimes int64, lastLoginTime time.Time, teleponePromoter int32, deviceId string) *PlayerGameRecEvent {
|
|
||||||
isNewbie := int32(0)
|
|
||||||
tCreateDay := now.New(createDayTime).BeginningOfDay()
|
|
||||||
if now.BeginningOfDay().Equal(tCreateDay) {
|
|
||||||
isNewbie = 1
|
|
||||||
}
|
|
||||||
if gamingTime < 0 {
|
|
||||||
gamingTime = 0
|
|
||||||
}
|
|
||||||
return &PlayerGameRecEvent{RecordId: recordId,
|
|
||||||
SnId: snid,
|
|
||||||
Channel: channel,
|
|
||||||
Promoter: promoter,
|
|
||||||
TelephonePromoter: teleponePromoter,
|
|
||||||
Platform: platform,
|
|
||||||
City: city,
|
|
||||||
OS: os,
|
|
||||||
GameId: gameid,
|
|
||||||
ModeId: modeid,
|
|
||||||
Tax: tax,
|
|
||||||
//Taxex: taxex,
|
|
||||||
Amount: amount,
|
|
||||||
ValidBet: validbet,
|
|
||||||
ValidFlow: validflow,
|
|
||||||
In: in,
|
|
||||||
Out: out,
|
|
||||||
CreateTime: time.Now().Local().Unix(),
|
|
||||||
CreateDayTime: tCreateDay.Local().Unix(),
|
|
||||||
IsNew: isNewbie,
|
|
||||||
GameFreeID: gameFreeId,
|
|
||||||
GamingTime: gamingTime,
|
|
||||||
FirstTime: firstGameFreeTime.Unix(),
|
|
||||||
FirstGameTime: firstGameTime.Unix(),
|
|
||||||
PlayTimes: playGameFreeTimes,
|
|
||||||
PlayGameTimes: playerGameTimes,
|
|
||||||
LastLoginTime: lastLoginTime.Unix(),
|
|
||||||
DeviceId: deviceId,
|
|
||||||
ChannelId: channelId,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 玩家游戏记录
|
// 玩家游戏记录
|
||||||
//type PlayerGameRecPayEvent struct {
|
//type PlayerGameRecPayEvent struct {
|
||||||
// SnId int32 //用户ID
|
// SnId int32 //用户ID
|
||||||
|
|
|
@ -1536,6 +1536,7 @@ type TienLenPerson struct {
|
||||||
UserIcon int32 //玩家头像
|
UserIcon int32 //玩家头像
|
||||||
Platform string `json:"-"`
|
Platform string `json:"-"`
|
||||||
Channel string `json:"-"`
|
Channel string `json:"-"`
|
||||||
|
ChannelId string `json:"-"`
|
||||||
Promoter string `json:"-"`
|
Promoter string `json:"-"`
|
||||||
PackageTag string `json:"-"`
|
PackageTag string `json:"-"`
|
||||||
InviterId int32 `json:"-"`
|
InviterId int32 `json:"-"`
|
||||||
|
@ -1581,6 +1582,7 @@ type ChesstitiansPerson struct {
|
||||||
UserIcon int32 //玩家头像
|
UserIcon int32 //玩家头像
|
||||||
Platform string `json:"-"`
|
Platform string `json:"-"`
|
||||||
Channel string `json:"-"`
|
Channel string `json:"-"`
|
||||||
|
ChannelId string `json:"-"`
|
||||||
Promoter string `json:"-"`
|
Promoter string `json:"-"`
|
||||||
PackageTag string `json:"-"`
|
PackageTag string `json:"-"`
|
||||||
InviterId int32 `json:"-"`
|
InviterId int32 `json:"-"`
|
||||||
|
|
|
@ -51,7 +51,7 @@ type GamePlayerListLog struct {
|
||||||
GameClass int32 //游戏类型 1棋牌 2电子 3百人 4捕鱼 5视讯 6彩票 7体育
|
GameClass int32 //游戏类型 1棋牌 2电子 3百人 4捕鱼 5视讯 6彩票 7体育
|
||||||
MatchId int64
|
MatchId int64
|
||||||
MatchType int64 //0.普通场 1.锦标赛 2.冠军赛 3.vip专属
|
MatchType int64 //0.普通场 1.锦标赛 2.冠军赛 3.vip专属
|
||||||
Ts int32
|
Ts int64
|
||||||
IsFree bool //拉霸专用 是否免费
|
IsFree bool //拉霸专用 是否免费
|
||||||
WinSmallGame int64 //拉霸专用 小游戏奖励
|
WinSmallGame int64 //拉霸专用 小游戏奖励
|
||||||
WinTotal int64 //拉霸专用 输赢
|
WinTotal int64 //拉霸专用 输赢
|
||||||
|
@ -95,7 +95,7 @@ func NewGamePlayerListLogEx(snid int32, gamedetailedlogid string, platform, chan
|
||||||
cl.WinSmallGame = winSmallGame
|
cl.WinSmallGame = winSmallGame
|
||||||
cl.WinTotal = winTotal
|
cl.WinTotal = winTotal
|
||||||
tNow := time.Now()
|
tNow := time.Now()
|
||||||
cl.Ts = int32(tNow.Unix())
|
cl.Ts = tNow.Unix()
|
||||||
cl.Time = tNow
|
cl.Time = tNow
|
||||||
cl.MatchId = matchid
|
cl.MatchId = matchid
|
||||||
cl.MatchType = matchType
|
cl.MatchType = matchType
|
||||||
|
|
Loading…
Reference in New Issue