Compare commits
3 Commits
24dd497af4
...
d9d78d2f13
Author | SHA1 | Date |
---|---|---|
|
d9d78d2f13 | |
|
ff7452d335 | |
|
4d30e087c6 |
|
@ -26,7 +26,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var platform string
|
var platform, appChannel, channelId string
|
||||||
var snid int32
|
var snid int32
|
||||||
var createTs int64
|
var createTs int64
|
||||||
var p *model.PlayerData
|
var p *model.PlayerData
|
||||||
|
@ -44,6 +44,8 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
||||||
platform = p.Platform
|
platform = p.Platform
|
||||||
snid = p.SnId
|
snid = p.SnId
|
||||||
createTs = p.CreateTime.Unix()
|
createTs = p.CreateTime.Unix()
|
||||||
|
appChannel = p.Channel
|
||||||
|
channelId = p.ChannelId
|
||||||
}
|
}
|
||||||
|
|
||||||
//LogChannelSingleton.WriteLog(&model.ClientLog{
|
//LogChannelSingleton.WriteLog(&model.ClientLog{
|
||||||
|
@ -54,11 +56,13 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
||||||
//})
|
//})
|
||||||
|
|
||||||
LogChannelSingleton.WriteLog(&model.ClientLogMysql{
|
LogChannelSingleton.WriteLog(&model.ClientLogMysql{
|
||||||
Data: msg.GetData(),
|
Data: msg.GetData(),
|
||||||
Platform: platform,
|
Platform: platform,
|
||||||
Snid: snid,
|
Snid: snid,
|
||||||
Ts: time.Now().Unix(),
|
Ts: time.Now().Unix(),
|
||||||
CreateTs: createTs,
|
CreateTs: createTs,
|
||||||
|
AppChannel: appChannel,
|
||||||
|
ChannelId: channelId,
|
||||||
})
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -7,11 +7,13 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
type ClientLog struct {
|
type ClientLog struct {
|
||||||
Data string // 客户端数据,json格式
|
Data string // 客户端数据,json格式
|
||||||
Platform string // 平台id
|
Platform string // 平台id
|
||||||
Snid int32 // 玩家id
|
Snid int32 // 玩家id
|
||||||
Ts int64 // 时间戳
|
Ts int64 // 时间戳
|
||||||
CreateTs int64 // 注册时间
|
CreateTs int64 // 注册时间
|
||||||
|
AppChannel string // 注册时的包渠道
|
||||||
|
ChannelId string // 推广渠道
|
||||||
}
|
}
|
||||||
|
|
||||||
type CustomData struct {
|
type CustomData struct {
|
||||||
|
|
|
@ -3,6 +3,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"mongo.games.com/goserver/core/basic"
|
"mongo.games.com/goserver/core/basic"
|
||||||
|
@ -579,8 +580,8 @@ func CSDollChangeLog(s *netlib.Session, packetid int, data interface{}, sid int6
|
||||||
info.UserName = log.UserName
|
info.UserName = log.UserName
|
||||||
info.UserTel = log.UserTel
|
info.UserTel = log.UserTel
|
||||||
info.Addr = log.Addr
|
info.Addr = log.Addr
|
||||||
info.CreateTs = log.CreateTs.String()
|
info.CreateTs = strconv.FormatInt(log.CreateTs, 10)
|
||||||
info.OpTs = log.OpTs.String()
|
info.OpTs = strconv.FormatInt(log.OpTs, 10)
|
||||||
info.Remark = log.Remark
|
info.Remark = log.Remark
|
||||||
pack.Info = append(pack.Info, info)
|
pack.Info = append(pack.Info, info)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue