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