Compare commits
No commits in common. "ae426732245dd92c4a019475d3ee7630729f8d14" and "10d494e9a86598994aaa1deaf1654207a8bf0c75" have entirely different histories.
ae42673224
...
10d494e9a8
|
@ -934,30 +934,31 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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,
|
||||||
IsFirstGame: false,
|
ValidBet: validBet,
|
||||||
|
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: 2,
|
}
|
||||||
})
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/jinzhu/now"
|
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"time"
|
"time"
|
||||||
|
@ -622,14 +621,7 @@ func (this *Player) AddRankScore(rankType int32, num int64) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReportGameEventParam struct {
|
func (this *Player) ReportGameEvent(tax, taxex, changeCoin, validbet, validFlow, in, out int64) {
|
||||||
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
|
||||||
|
@ -646,46 +638,12 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) {
|
||||||
gameFreeTimes = dataGame.Statics.GameTimes
|
gameFreeTimes = dataGame.Statics.GameTimes
|
||||||
}
|
}
|
||||||
|
|
||||||
isNew := int32(0)
|
gamingTime := int32(time.Now().Sub(this.scene.GameNowTime).Seconds())
|
||||||
tCreateDay := now.New(this.CreateTime.Local()).BeginningOfDay()
|
mq.Write(model.CreatePlayerGameRecEvent(this.SnId, tax, taxex, changeCoin, validbet, validFlow, in, out,
|
||||||
if now.BeginningOfDay().Equal(tCreateDay) {
|
this.scene.GameId, this.scene.GetGameFreeId(), int32(this.scene.GameMode),
|
||||||
isNew = 1
|
this.scene.GetRecordId(), this.Channel, this.ChannelId, this.BeUnderAgentCode, this.Platform, this.City, this.DeviceOS,
|
||||||
}
|
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,7 +2,6 @@ package base
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/globalsign/mgo/bson"
|
|
||||||
"math"
|
"math"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -88,8 +87,7 @@ type Scene struct {
|
||||||
SystemCoinOut int64 //本局游戏机器人营收 机器人赢:正值 机器人输:负值
|
SystemCoinOut int64 //本局游戏机器人营收 机器人赢:正值 机器人输:负值
|
||||||
ChessRank []int32
|
ChessRank []int32
|
||||||
RealCtrl bool
|
RealCtrl bool
|
||||||
CycleID string // 房卡场多轮对局id
|
CycleID string
|
||||||
LogId string // 游戏每局id
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewScene(args *CreateSceneParam) *Scene {
|
func NewScene(args *CreateSceneParam) *Scene {
|
||||||
|
@ -162,104 +160,75 @@ 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 {
|
||||||
n := this.WGCreateScene.GetPlayerNum()
|
return int(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
|
||||||
}
|
}
|
||||||
|
@ -267,55 +236,42 @@ 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
|
||||||
}
|
}
|
||||||
|
@ -1447,6 +1403,112 @@ 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
|
||||||
|
@ -1457,160 +1519,55 @@ func (this *Scene) SaveFriendRecord(snid int32, isWin int32, billCoin int64, bas
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type SaveGameDetailedParam struct {
|
// 保存玩家和GameDetailedLog的映射表
|
||||||
LogId string // 日志id
|
func (this *Scene) SaveGamePlayerListLog(snid int32, param *SaveGamePlayerListLogParam) {
|
||||||
Detail string // 游戏详细信息
|
if this != nil {
|
||||||
GameTime int64 // 游戏时长
|
if !this.Testing { //测试场屏蔽掉 龙虎两边都压,totalin和totalout都=0,这个条件去掉
|
||||||
Trend20Lately string // 最近20局开奖结果
|
//统计流水值
|
||||||
CtrlType int // 调控类型 1控赢 2控输
|
playerEx := this.GetPlayer(snid)
|
||||||
PlayerPool map[int]int // 个人水池分
|
//有些结算的时候,玩家已经退场,不要用是否在游戏,0709,修改为扣税后数值
|
||||||
}
|
if playerEx != nil && !param.IsLeave && !playerEx.IsRob && (param.IsFree || param.TotalIn != 0 || param.TotalOut != 0) {
|
||||||
|
totalFlow := param.ValidFlow * int64(this.GetDBGameFree().GetBetWaterRate()) / 100
|
||||||
func (this *Scene) SaveGameDetailedLog(param *SaveGameDetailedParam) {
|
playerEx.TotalConvertibleFlow += totalFlow
|
||||||
if this == nil || param == nil {
|
playerEx.TotalFlow += totalFlow
|
||||||
return
|
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)
|
||||||
}
|
}
|
||||||
|
|
||||||
if param.GameTime <= 0 {
|
roomType := int32(this.SceneMode)
|
||||||
param.GameTime = int64(time.Now().Sub(this.GameNowTime).Seconds())
|
if this.GameId == common.GameId_Avengers ||
|
||||||
|
this.GameId == common.GameId_CaiShen ||
|
||||||
|
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
|
||||||
}
|
}
|
||||||
|
|
||||||
if param.GameTime < 0 {
|
Name := param.PlayerName
|
||||||
param.GameTime = 0
|
if playerEx != nil {
|
||||||
|
Name = param.PlayerName
|
||||||
}
|
}
|
||||||
|
|
||||||
now := time.Now()
|
log := model.NewGamePlayerListLogEx(snid, param.LogId, param.Platform, param.Channel, param.Promoter, param.PackageTag,
|
||||||
|
this.GameId, baseScore, this.SceneId, int32(this.GetGameMode()),
|
||||||
f := func(plt string) {
|
this.GetGameFreeId(), param.TotalIn, param.TotalOut, this.ClubId, this.RoomId, param.TaxCoin, param.ClubPumpCoin, roomType,
|
||||||
log := &model.GameDetailedLog{
|
param.BetAmount, param.WinAmountNoAnyTax, this.KeyGameId, Name, this.GetDBGameFree().GetGameClass(),
|
||||||
Id: bson.NewObjectId(),
|
param.IsFirstGame, this.GetMatch().GetMatchSortId(), int64(this.GetMatch().GetMatchType()), param.IsFree, param.WinSmallGame, param.WinTotal, param.CycleId)
|
||||||
LogId: param.LogId,
|
if log != nil {
|
||||||
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)
|
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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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: 2,
|
}
|
||||||
})
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -767,7 +767,6 @@ 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,6 +1298,9 @@ 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())
|
||||||
|
|
||||||
// 游戏数据统计
|
// 游戏数据统计
|
||||||
|
@ -1310,29 +1313,16 @@ func (this *SceneStateBilled) OnEnter(s *base.Scene) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 玩家游戏记录
|
// 玩家游戏记录
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
sceneEx.SaveGamePlayerListLog(o_player.UserId,
|
||||||
LogId: logid,
|
base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
||||||
Platform: o_player.Platform,
|
o_player.PackageTag, logid, o_player.InviterId, totalin, totalout, o_player.GainTaxCoin,
|
||||||
Snid: o_player.UserId,
|
0, 0, o_player.GainCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave))
|
||||||
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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sceneEx.NotifySceneRoundPause()
|
sceneEx.NotifySceneRoundPause()
|
||||||
|
|
|
@ -781,28 +781,34 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
||||||
LogId: sceneEx.logid,
|
|
||||||
Detail: info,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TotalBetValue := 0
|
TotalBetValue := 0
|
||||||
totalin := int64(TotalBetValue)
|
totalin := int64(TotalBetValue)
|
||||||
totalout := playerEx.gainCoin
|
totalout := playerEx.gainCoin
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: sceneEx.logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: sceneEx.logid,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: int64(TotalBetValue),
|
BetAmount: int64(TotalBetValue),
|
||||||
|
WinAmountNoAnyTax: playerEx.gainCoin,
|
||||||
|
ValidBet: validBet,
|
||||||
|
ValidFlow: validFlow,
|
||||||
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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: 2,
|
}
|
||||||
})
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,24 +262,13 @@ 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()
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
Platform: this.Platform,
|
param := base.GetSaveGamePlayerListLogParam(this.Platform, this.Channel, this.BeUnderAgentCode, this.PackageID, logid,
|
||||||
Snid: this.SnId,
|
this.InviterId, totalin, totalout, int64(this.sTaxCoin), 0, totalin,
|
||||||
PlayerName: this.Name,
|
totalout, validFlow, validBet, sceneEx.IsPlayerFirst(this.Player), false)
|
||||||
Channel: this.Channel,
|
sceneEx.SaveGamePlayerListLog(this.SnId, param)
|
||||||
ChannelId: this.ChannelId,
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
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{
|
||||||
|
|
|
@ -407,7 +407,6 @@ func (this *SceneStateStartFortuneDragon) OnPlayerOp(s *base.Scene, p *base.Play
|
||||||
var gameEndStr string
|
var gameEndStr string
|
||||||
var data assemble.GameEnd
|
var data assemble.GameEnd
|
||||||
if err == nil {
|
if err == nil {
|
||||||
s.SetGameNowTime(time.Now())
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
//logger.Logger.Trace("=====================AddCoin=====TotalBet===", -data.TotalBet)
|
//logger.Logger.Trace("=====================AddCoin=====TotalBet===", -data.TotalBet)
|
||||||
|
@ -513,11 +512,7 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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,22 +520,25 @@ 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
|
||||||
}
|
}
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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,
|
}
|
||||||
GameTime: 2,
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,6 @@ func (this *SceneStateStartFortuneOx) OnPlayerOp(s *base.Scene, p *base.Player,
|
||||||
var gameEndStr string
|
var gameEndStr string
|
||||||
var data assemble.GameEnd
|
var data assemble.GameEnd
|
||||||
if err == nil {
|
if err == nil {
|
||||||
s.SetGameNowTime(time.Now())
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
||||||
var respinStatus int
|
var respinStatus int
|
||||||
if data.Results[0].ArrSpins[0].Special != nil {
|
if data.Results[0].ArrSpins[0].Special != nil {
|
||||||
|
@ -518,11 +517,7 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
|
@ -530,22 +525,25 @@ 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
|
||||||
}
|
}
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: totalin,
|
BetAmount: playerEx.totalBet,
|
||||||
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,
|
}
|
||||||
GameTime: 2,
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,6 @@ func (this *SceneStateStartFortuneRabbit) OnPlayerOp(s *base.Scene, p *base.Play
|
||||||
var gameEndStr string
|
var gameEndStr string
|
||||||
var data assemble.GameEnd
|
var data assemble.GameEnd
|
||||||
if err == nil {
|
if err == nil {
|
||||||
s.SetGameNowTime(time.Now())
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
||||||
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
if data.Results[0].FreeStatus == 1 || data.Results[0].FreeNumMax == 0 {
|
||||||
//第一次触发或者正常模式
|
//第一次触发或者正常模式
|
||||||
|
@ -512,11 +511,7 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
|
@ -524,22 +519,25 @@ 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
|
||||||
}
|
}
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: totalin,
|
BetAmount: playerEx.totalBet,
|
||||||
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,
|
}
|
||||||
GameTime: 2,
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,6 @@ func (this *SceneStateStartFortuneTiger) OnPlayerOp(s *base.Scene, p *base.Playe
|
||||||
var gameEndStr string
|
var gameEndStr string
|
||||||
var data assemble.GameEnd
|
var data assemble.GameEnd
|
||||||
if err == nil {
|
if err == nil {
|
||||||
s.SetGameNowTime(time.Now())
|
|
||||||
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
data = assemble.DataToCli(Response).(assemble.GameEnd)
|
||||||
var respinStatus int
|
var respinStatus int
|
||||||
if data.Results[0].ArrSpins[0].Special != nil {
|
if data.Results[0].ArrSpins[0].Special != nil {
|
||||||
|
@ -515,11 +514,7 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
|
@ -527,22 +522,25 @@ 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
|
||||||
}
|
}
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
TotalIn: totalin,
|
TotalIn: totalin,
|
||||||
TotalOut: totalout,
|
TotalOut: totalout,
|
||||||
TaxCoin: playerEx.taxCoin,
|
TaxCoin: playerEx.taxCoin,
|
||||||
BetAmount: totalin,
|
BetAmount: playerEx.totalBet,
|
||||||
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,
|
}
|
||||||
GameTime: 2,
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -326,11 +326,7 @@ 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(&base.SaveGameDetailedParam{
|
s.SaveGameDetailedLog(logId, info, &base.GameDetailedParam{})
|
||||||
LogId: logId,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
//水池上下文环境s
|
//水池上下文环境s
|
||||||
s.CpCtx = p.cpCtx
|
s.CpCtx = p.cpCtx
|
||||||
var totalIn, totalOut int64
|
var totalIn, totalOut int64
|
||||||
|
@ -340,21 +336,21 @@ 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(&base.SaveGamePlayerListLogParam{
|
s.SaveGamePlayerListLog(p.SnId,
|
||||||
LogId: logId,
|
&base.SaveGamePlayerListLogParam{
|
||||||
Platform: p.Platform,
|
Platform: p.Platform,
|
||||||
Snid: p.SnId,
|
|
||||||
PlayerName: p.Name,
|
|
||||||
Channel: p.Channel,
|
Channel: p.Channel,
|
||||||
ChannelId: p.ChannelId,
|
Promoter: p.BeUnderAgentCode,
|
||||||
|
PackageTag: p.PackageID,
|
||||||
|
InviterId: p.InviterId,
|
||||||
|
LogId: logId,
|
||||||
TotalIn: totalIn,
|
TotalIn: totalIn,
|
||||||
TotalOut: totalOut,
|
TotalOut: totalOut,
|
||||||
TaxCoin: p.taxCoin,
|
TaxCoin: p.taxCoin,
|
||||||
|
ClubPumpCoin: 0,
|
||||||
BetAmount: totalIn,
|
BetAmount: totalIn,
|
||||||
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
||||||
IsFirstGame: s.IsPlayerFirst(p.Player),
|
IsFirstGame: s.IsPlayerFirst(p.Player),
|
||||||
IsFree: totalIn == 0,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
s.GameNowTime = time.Now()
|
s.GameNowTime = time.Now()
|
||||||
|
|
|
@ -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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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: 2,
|
}
|
||||||
})
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -348,11 +348,7 @@ 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(&base.SaveGameDetailedParam{
|
s.SaveGameDetailedLog(logId, info, &base.GameDetailedParam{})
|
||||||
LogId: logId,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
//水池上下文环境s
|
//水池上下文环境s
|
||||||
s.CpCtx = p.cpCtx
|
s.CpCtx = p.cpCtx
|
||||||
var totalIn, totalOut int64
|
var totalIn, totalOut int64
|
||||||
|
@ -362,21 +358,21 @@ 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(&base.SaveGamePlayerListLogParam{
|
s.SaveGamePlayerListLog(p.SnId,
|
||||||
LogId: logId,
|
&base.SaveGamePlayerListLogParam{
|
||||||
Platform: p.Platform,
|
Platform: p.Platform,
|
||||||
Snid: p.SnId,
|
|
||||||
PlayerName: p.Name,
|
|
||||||
Channel: p.Channel,
|
Channel: p.Channel,
|
||||||
ChannelId: p.ChannelId,
|
Promoter: p.BeUnderAgentCode,
|
||||||
|
PackageTag: p.PackageID,
|
||||||
|
InviterId: p.InviterId,
|
||||||
|
LogId: logId,
|
||||||
TotalIn: totalIn,
|
TotalIn: totalIn,
|
||||||
TotalOut: totalOut,
|
TotalOut: totalOut,
|
||||||
TaxCoin: p.taxCoin,
|
TaxCoin: p.taxCoin,
|
||||||
|
ClubPumpCoin: 0,
|
||||||
BetAmount: totalIn,
|
BetAmount: totalIn,
|
||||||
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
WinAmountNoAnyTax: p.Coin - p.startCoin,
|
||||||
IsFirstGame: s.IsPlayerFirst(p.Player),
|
IsFirstGame: s.IsPlayerFirst(p.Player),
|
||||||
IsFree: totalIn == 0,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
s.GameNowTime = time.Now()
|
s.GameNowTime = time.Now()
|
||||||
|
|
|
@ -33,7 +33,6 @@ type PlayerData struct {
|
||||||
|
|
||||||
Platform string //平台
|
Platform string //平台
|
||||||
Channel string //渠道信息
|
Channel string //渠道信息
|
||||||
ChannelId string
|
|
||||||
PackageID string //推广包标识 对应客户端的packagetag
|
PackageID string //推广包标识 对应客户端的packagetag
|
||||||
flag int
|
flag int
|
||||||
}
|
}
|
||||||
|
@ -334,7 +333,6 @@ 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,28 +1166,33 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
||||||
LogId: sceneEx.logid,
|
|
||||||
Detail: info,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
totalin := int64(TotalBetValue)
|
totalin := int64(TotalBetValue)
|
||||||
totalout := playerEx.gainCoin
|
totalout := playerEx.gainCoin
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: sceneEx.logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: sceneEx.logid,
|
||||||
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,
|
||||||
IsFirstGame: s.IsPlayerFirst(playerEx.Player),
|
ValidBet: validBet,
|
||||||
})
|
ValidFlow: validFlow,
|
||||||
|
IsFirstGame: sceneEx.IsPlayerFirst(playerEx.Player),
|
||||||
|
IsFree: false,
|
||||||
|
WinSmallGame: 0,
|
||||||
|
WinTotal: 0,
|
||||||
|
}
|
||||||
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1243,30 +1248,34 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{})
|
||||||
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)
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
LogId: sceneEx.logid,
|
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: sceneEx.logid,
|
||||||
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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(logid, info, &base.GameDetailedParam{})
|
||||||
LogId: logid,
|
|
||||||
Detail: info,
|
|
||||||
GameTime: 2,
|
|
||||||
})
|
|
||||||
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
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
|
logParam := &base.SaveGamePlayerListLogParam{
|
||||||
Platform: playerEx.Platform,
|
Platform: playerEx.Platform,
|
||||||
Snid: playerEx.SnId,
|
|
||||||
PlayerName: playerEx.Name,
|
|
||||||
Channel: playerEx.Channel,
|
Channel: playerEx.Channel,
|
||||||
ChannelId: playerEx.ChannelId,
|
Promoter: playerEx.BeUnderAgentCode,
|
||||||
|
PackageTag: playerEx.PackageID,
|
||||||
|
InviterId: playerEx.InviterId,
|
||||||
|
LogId: logid,
|
||||||
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: 2,
|
}
|
||||||
})
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,22 +181,11 @@ 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(&base.SaveGamePlayerListLogParam{
|
sceneEx.SaveGamePlayerListLog(playerEx.SnId, base.GetSaveGamePlayerListLogParam(playerEx.Platform, playerEx.Channel, playerEx.BeUnderAgentCode,
|
||||||
LogId: sceneEx.logid,
|
playerEx.PackageID, sceneEx.logid, playerEx.InviterId, totalin, totalout, playerEx.taxCoin,
|
||||||
Platform: playerEx.Platform,
|
0, 0, playerEx.gainCoin, validBet, validFlow, sceneEx.IsPlayerFirst(sceneEx.GetPlayer(playerEx.SnId)), false))
|
||||||
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,
|
||||||
|
@ -1298,7 +1287,7 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
RoomType: sceneEx.GetSceneType(),
|
RoomType: sceneEx.GetSceneType(),
|
||||||
BaseScore: int32(sceneEx.GetBaseScore()),
|
BaseScore: int32(sceneEx.GetBaseScore()),
|
||||||
NowRound: int32(sceneEx.NumOfGames),
|
NowRound: int32(sceneEx.NumOfGames),
|
||||||
TaxRate: s.GetDBGameFree().GetTaxRate(),
|
ClubRate: sceneEx.Scene.PumpCoin,
|
||||||
}
|
}
|
||||||
var person []model.ThirteenWaterPerson
|
var person []model.ThirteenWaterPerson
|
||||||
for _, o_player := range sceneEx.players {
|
for _, o_player := range sceneEx.players {
|
||||||
|
@ -1365,20 +1354,11 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
||||||
} else {
|
} else {
|
||||||
totalin -= o_player.gainCoin
|
totalin -= o_player.gainCoin
|
||||||
}
|
}
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
validFlow := totalin + totalout
|
||||||
LogId: sceneEx.logid,
|
validBet := common.AbsI64(totalin - totalout)
|
||||||
Platform: o_player.Platform,
|
sceneEx.SaveGamePlayerListLog(o_player.SnId, base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.BeUnderAgentCode,
|
||||||
Snid: o_player.SnId,
|
o_player.PackageID, sceneEx.logid, o_player.InviterId, totalin, totalout, o_player.taxCoin,
|
||||||
PlayerName: o_player.Name,
|
0, 0, o_player.gainCoin, validBet, validFlow, p.IsFirst, false))
|
||||||
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,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1437,9 +1417,8 @@ 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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(sceneEx.logid, info, &base.GameDetailedParam{
|
||||||
LogId: sceneEx.logid,
|
Trend20Lately: "",
|
||||||
Detail: info,
|
|
||||||
CtrlType: sceneEx.ctrlType,
|
CtrlType: sceneEx.ctrlType,
|
||||||
PlayerPool: playerPool,
|
PlayerPool: playerPool,
|
||||||
})
|
})
|
||||||
|
|
|
@ -1737,7 +1737,6 @@ 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,
|
||||||
|
@ -1889,7 +1888,6 @@ 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,
|
||||||
|
@ -2032,7 +2030,6 @@ 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,
|
||||||
|
@ -2144,7 +2141,6 @@ 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,
|
||||||
|
@ -2250,7 +2246,6 @@ 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,
|
||||||
|
@ -2402,7 +2397,6 @@ 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,
|
||||||
|
@ -2533,7 +2527,6 @@ 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,
|
||||||
|
@ -2736,6 +2729,8 @@ 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())
|
||||||
|
|
||||||
// 玩家数据统计
|
// 玩家数据统计
|
||||||
|
@ -2757,29 +2752,20 @@ func (this *SceneBilledStateTienLen) OnEnter(s *base.Scene) {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 保存玩家游戏记录
|
// 保存玩家游戏记录
|
||||||
sceneEx.SaveGamePlayerListLog(&base.SaveGamePlayerListLogParam{
|
param := base.GetSaveGamePlayerListLogParam(o_player.Platform, o_player.Channel, o_player.Promoter,
|
||||||
LogId: sceneEx.recordId,
|
o_player.PackageTag, sceneEx.recordId, o_player.InviterId, totalin, totalout, o_player.BillTaxCoin,
|
||||||
Platform: o_player.Platform,
|
0, 0, o_player.GainCoin+o_player.BombCoin, validBet, validFlow, o_player.IsFirst, o_player.IsLeave)
|
||||||
Snid: o_player.UserId,
|
param.CycleId = sceneEx.CycleID
|
||||||
Channel: o_player.Channel,
|
sceneEx.SaveGamePlayerListLog(o_player.UserId, param)
|
||||||
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(&base.SaveGameDetailedParam{
|
sceneEx.SaveGameDetailedLog(sceneEx.recordId, info, &base.GameDetailedParam{
|
||||||
LogId: sceneEx.recordId,
|
|
||||||
Detail: info,
|
|
||||||
Trend20Lately: "",
|
Trend20Lately: "",
|
||||||
CtrlType: sceneEx.ctrlType,
|
CtrlType: sceneEx.ctrlType,
|
||||||
PlayerPool: tienlenType.PlayerPool,
|
PlayerPool: tienlenType.PlayerPool,
|
||||||
|
CycleId: sceneEx.CycleID,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -275,6 +275,49 @@ 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
|
||||||
|
|
|
@ -168,8 +168,8 @@ type ThirteenWaterType struct {
|
||||||
NowRound int32 //当前局数
|
NowRound int32 //当前局数
|
||||||
PlayerCount int //玩家数量
|
PlayerCount int //玩家数量
|
||||||
BaseScore int32 //底分
|
BaseScore int32 //底分
|
||||||
TaxRate int32 //税率(万分比)
|
|
||||||
PlayerData []ThirteenWaterPerson //玩家信息
|
PlayerData []ThirteenWaterPerson //玩家信息
|
||||||
|
ClubRate int32 //俱乐部抽水比例
|
||||||
}
|
}
|
||||||
|
|
||||||
type ThirteenWaterPoker struct {
|
type ThirteenWaterPoker struct {
|
||||||
|
@ -1536,7 +1536,6 @@ 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:"-"`
|
||||||
|
@ -1582,7 +1581,6 @@ 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 int64
|
Ts int32
|
||||||
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 = tNow.Unix()
|
cl.Ts = int32(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