fix:游戏分组统计数据

This commit is contained in:
sk 2024-12-19 17:50:49 +08:00
parent 893bc4cbbb
commit 08023bcdea
4 changed files with 5 additions and 4 deletions

View File

@ -899,6 +899,6 @@ var GuideIdToGainWay = map[int]int{
GuideIdCustom: GainWayGuide2,
}
func GetGameDifKey(gamedif string) string {
func GetKeyGameDif(gamedif string) string {
return fmt.Sprintf("gamedif-%v", gamedif)
}

View File

@ -653,7 +653,7 @@ func (this *Player) ReportGameEvent(param *ReportGameEventParam) *ReportGameEven
gameTimes = dataGame.Statics.GameTimes
}
dataGameDif, ok := this.GDatas[common.GetGameDifKey(this.scene.GetDBGameFree().GetGameDif())]
dataGameDif, ok := this.GDatas[common.GetKeyGameDif(this.scene.GetDBGameFree().GetGameDif())]
if ok {
gamedifFirstTime = dataGameDif.FirstTime
gamedifTimes = dataGameDif.Statics.GameTimes

View File

@ -2111,7 +2111,7 @@ func (this *Scene) Statistics(param *StaticParam) {
var statics []*model.PlayerGameStatics
keyGameId := strconv.Itoa(this.GetGameId())
keyGameFreeId := strconv.Itoa(int(this.GetGameFreeId()))
keyGameDif := common.GetGameDifKey(this.GetDBGameFree().GetGameDif())
keyGameDif := common.GetKeyGameDif(this.GetDBGameFree().GetGameDif())
// 当天数据统计
// 按场次分
if data, ok := p.TodayGameData.CtrlData[keyGameFreeId]; ok {
@ -2350,7 +2350,7 @@ func (this *Scene) StaticsLaba(param *StaticLabaParam) {
var statics []*model.PlayerGameStatics
keyGameId := strconv.Itoa(this.GetGameId())
keyGameFreeId := strconv.Itoa(int(this.GetGameFreeId()))
keyGameDif := common.GetGameDifKey(this.GetDBGameFree().GetGameDif())
keyGameDif := common.GetKeyGameDif(this.GetDBGameFree().GetGameDif())
// 当天数据统计
// 按场次分
if data, ok := p.TodayGameData.CtrlData[keyGameFreeId]; ok {

View File

@ -1260,6 +1260,7 @@ func (this *Player) UnmarshalData(data []byte, scene *Scene) {
strconv.Itoa(int(scene.dbGameFree.GetGameId())),
common.GetKeyNoviceGameId(int(scene.dbGameFree.GetGameId())),
common.GetKeyGameType(int(scene.dbGameFree.GetGameType())),
common.GetKeyGameDif(scene.dbGameFree.GetGameDif()),
} {
if d, ok := pd.GDatas[v]; ok {
this.GDatas[v] = d