1
This commit is contained in:
parent
927e694afa
commit
ddc41fd55b
@ -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)
|
||||
}
|
16
server/statserver/controller/stat.go
Normal file
16
server/statserver/controller/stat.go
Normal 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", "")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user