Compare commits

...

3 Commits

3 changed files with 20 additions and 13 deletions

View File

@ -26,7 +26,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
return nil
}
var platform string
var platform, appChannel, channelId string
var snid int32
var createTs int64
var p *model.PlayerData
@ -44,6 +44,8 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
platform = p.Platform
snid = p.SnId
createTs = p.CreateTime.Unix()
appChannel = p.Channel
channelId = p.ChannelId
}
//LogChannelSingleton.WriteLog(&model.ClientLog{
@ -59,6 +61,8 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
Snid: snid,
Ts: time.Now().Unix(),
CreateTs: createTs,
AppChannel: appChannel,
ChannelId: channelId,
})
return nil

View File

@ -12,6 +12,8 @@ type ClientLog struct {
Snid int32 // 玩家id
Ts int64 // 时间戳
CreateTs int64 // 注册时间
AppChannel string // 注册时的包渠道
ChannelId string // 推广渠道
}
type CustomData struct {

View File

@ -3,6 +3,7 @@ package main
import (
"fmt"
"math/rand"
"strconv"
"time"
"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.UserTel = log.UserTel
info.Addr = log.Addr
info.CreateTs = log.CreateTs.String()
info.OpTs = log.OpTs.String()
info.CreateTs = strconv.FormatInt(log.CreateTs, 10)
info.OpTs = strconv.FormatInt(log.OpTs, 10)
info.Remark = log.Remark
pack.Info = append(pack.Info, info)
}