|
|
@@ -764,7 +764,7 @@ func (s *LogicalLog) GetPcReportingLog(ctx context.Context, pcCode string) (num
|
|
|
return
|
|
|
}
|
|
|
end := time.Now().UnixNano()/1e6 + 60*1000*2
|
|
|
- start := end - (120*60*1000 + 60*1000)
|
|
|
+ start := end - (60*60*1000 + 60*1000)
|
|
|
op := redis.ZRangeBy{
|
|
|
Min: strconv.Itoa(int(start)),
|
|
|
Max: strconv.Itoa(int(end)),
|
|
|
@@ -860,3 +860,21 @@ func (s *LogicalLog) AddCodeLog(request request.AddLogRequest, status int) {
|
|
|
global.GVA_LOG.Error("create LogScanningCode fail", zap.Error(err))
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// 记录ip信息
|
|
|
+func (s *LogicalLog) AddIpLog(request request.AddLogRequest) {
|
|
|
+ if request.SimulatorIp == "" {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ logSC := new(log.IpLog)
|
|
|
+ logSC.GameId = request.GameId
|
|
|
+ logSC.LogUuid = request.LogUuid
|
|
|
+ logSC.Ip = request.SimulatorIp
|
|
|
+ logSC.Account = request.Account
|
|
|
+ logSC.PcCode = request.PcCode
|
|
|
+ logSC.CreateDate = time.Now()
|
|
|
+ err := global.GVA_DB.Omit("create_time").Create(&logSC).Error
|
|
|
+ if err != nil {
|
|
|
+ global.GVA_LOG.Error("create LogScanningCode fail", zap.Error(err))
|
|
|
+ }
|
|
|
+}
|