This commit is contained in:
aozhiwei 2024-05-25 10:45:09 +08:00
parent 927e694afa
commit ddc41fd55b
2 changed files with 16 additions and 50 deletions

View File

@ -1,50 +0,0 @@
package controller
import (
"q5"
"f5"
"github.com/gin-gonic/gin"
)
type GameLog struct {
}
func (this *GameLog) caCustomReport(c *gin.Context) {
accountId := c.DefaultQuery("account_id", "")
sessionId := c.DefaultQuery("session_id", "")
distinctId := c.DefaultQuery("localuuid", "")
channel := c.DefaultQuery("channel", "")
eventName := c.DefaultQuery("event_name", "")
_os := c.DefaultQuery("_os", "")
_net := c.DefaultQuery("_net", "")
gameId := c.DefaultQuery("gameid", "")
_serverTime := f5.GetApp().GetRealSeconds()
ip := c.Request.Header.Get("X-real-ip")
data := map[string]interface{}{}
if accountId != "" {
data["account_id"] = accountId
registerTime := f5.ExtractRegisterTimeFromSessionId(sessionId)
registerDate := q5.FormatUnixDateTime(f5.GetApp().GetRealSeconds(), f5.GetApp().GetLocation())
data["account_register_utctime"] = registerTime
data["account_register_date"] = registerDate
}
if distinctId != "" {
data["localuuid"] = distinctId
}
data["channel"] = channel
data["event_name"] = eventName
data["_os"] = _os
data["_net"] = _net
data["gameid"] = gameId
data["_server_time"] = _serverTime
f5.GetTgLog().AddCustomLog(
2006,
accountId,
distinctId,
ip,
data)
}

View File

@ -0,0 +1,16 @@
package controller
import (
"q5"
"f5"
"github.com/gin-gonic/gin"
)
type Stat struct {
}
func (this *Stat) caUpdateSession(c *gin.Context) {
accountId := c.DefaultQuery("account_id", "")
sessionId := c.DefaultQuery("session_id", "")
}