后台统计登录结果
This commit is contained in:
parent
0e5c0470b7
commit
e36757d9fa
|
@ -55,7 +55,7 @@ type LoginLog struct {
|
|||
BuildVersion string
|
||||
AppChannel string
|
||||
DeviceOS string
|
||||
ClientVer int32
|
||||
ClientVer int32
|
||||
}
|
||||
|
||||
func NewLoginLog(snId, logType int32, tel, ip, platform, channel, promoter, packageId, city string,
|
||||
|
@ -101,6 +101,10 @@ func NewLoginLog(snId, logType int32, tel, ip, platform, channel, promoter, pack
|
|||
return cl
|
||||
}
|
||||
|
||||
type LoginErrorLog struct {
|
||||
TypeId int32
|
||||
}
|
||||
|
||||
//func InsertLoginLogs(logs ...*LoginLog) (err error) {
|
||||
// if rpcCli == nil {
|
||||
// logger.Logger.Error("model.InsertLoginLogs rpcCli == nil")
|
||||
|
|
|
@ -21,6 +21,7 @@ const (
|
|||
BackOnlineGame = "back_onlinegame"
|
||||
BackRedPacket = "back_redpacket"
|
||||
NianPlayerRank = "log_nianplayerrank"
|
||||
LoginError = "log_loginerror"
|
||||
)
|
||||
|
||||
// go后端
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
"io"
|
||||
"mongo.games.com/game/mq"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
|
@ -61,6 +62,11 @@ func (this *CSLoginHandler) Process(s *netlib.Session, packetid int, data interf
|
|||
}
|
||||
proto.SetDefaults(sclogin)
|
||||
common.SendToGate(sid, int(login_proto.LoginPacketID_PACKET_SC_LOGIN), sclogin, s)
|
||||
logger.Logger.Trace("CSLoginHandler Process send ", sclogin)
|
||||
log := &model.LoginErrorLog{
|
||||
TypeId: int32(code.Enum().Number()),
|
||||
}
|
||||
mq.Write(log)
|
||||
}
|
||||
|
||||
sendSCDisconnect := func(code int32) {
|
||||
|
|
|
@ -36,6 +36,7 @@ func init() {
|
|||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.DBLotteryLog, Data: &model.LotteryLog{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: model.MQRankNian, Data: &model.NianInfo{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.NianPlayerRank, Data: &model.NianPlayerRankLog{}})
|
||||
mq.RegisterMessage(&mq.RegisterMessageParam{Name: mq.LoginError, Data: &model.LoginErrorLog{}})
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -433,4 +433,8 @@ func SCLogin(s *netlib.Session, sid int64, csLogin *login_proto.CSLogin, acc *mo
|
|||
proto.SetDefaults(sclogin)
|
||||
common.SendToGate(sid, int(login_proto.LoginPacketID_PACKET_SC_LOGIN), sclogin, s)
|
||||
logger.Logger.Tracef("SCLogin %v", sclogin)
|
||||
log := &model.LoginErrorLog{
|
||||
TypeId: int32(code.Enum().Number()),
|
||||
}
|
||||
mq.Write(log)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue