diff --git a/server/gamelog/app/app.go b/server/gamelog/app/app.go index 8fc8bf94..3811ac80 100644 --- a/server/gamelog/app/app.go +++ b/server/gamelog/app/app.go @@ -11,7 +11,7 @@ type app struct { } func (this *app) GetPkgName() string { - return "mailserver" + return "gamelog" } func (this *app) GetHttpListenPort() int32 { diff --git a/server/gamelog/controller/gamelog.go b/server/gamelog/controller/gamelog.go index 0dd8a1e8..f5a41274 100644 --- a/server/gamelog/controller/gamelog.go +++ b/server/gamelog/controller/gamelog.go @@ -1,6 +1,8 @@ package controller import ( + "q5" + "f5" "github.com/gin-gonic/gin" ) @@ -9,5 +11,40 @@ 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 := "" + + 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) } diff --git a/third_party/f5 b/third_party/f5 index 14ec9834..0ff50195 160000 --- a/third_party/f5 +++ b/third_party/f5 @@ -1 +1 @@ -Subproject commit 14ec9834496a58b833feb0f91f71b655de6314ad +Subproject commit 0ff501959028f0495977b9a5a59031d0c2ec4320