Browse Source

处理防火墙日志按分钟统计长时间改为短时间mm

Li 2 years ago
parent
commit
1c94b5f67f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      TEAMModelOS.SDK/Models/Service/BI/BILogAnalyseService.cs

+ 1 - 1
TEAMModelOS.SDK/Models/Service/BI/BILogAnalyseService.cs

@@ -159,7 +159,7 @@ namespace TEAMModelOS.SDK.Models.Service.BI
 
                     RecCnt saveCnts = new();
 
-                    List<RecAppGWInfo> recInfo = aGInfos.Select(s => new RecAppGWInfo { hour = cHour, ip = s.properties.clientIp, api = s.properties.requestUri.Split("?").ToList().Count() > 1 ? s.properties.requestUri.Split("?").ToList()[0] : s.properties.requestUri, hostName = s.properties.hostname,minute = DateTimeOffset.Parse(s.time).ToString("yyyyMMddHHmm") }).ToList();
+                    List<RecAppGWInfo> recInfo = aGInfos.Select(s => new RecAppGWInfo { hour = cHour, ip = s.properties.clientIp, api = s.properties.requestUri.Split("?").ToList().Count() > 1 ? s.properties.requestUri.Split("?").ToList()[0] : s.properties.requestUri, hostName = s.properties.hostname,minute = DateTimeOffset.Parse(s.time).ToString("mm") }).ToList();
 
                     List<RecApiCnt> apiCnt = recInfo.GroupBy(a => a.api).Select(g => new RecApiCnt { api = g.Key, count = g.Count(), hour = cHour, hostName = g.Select(h => h.hostName).Distinct().ToList(), ip = g.Select(i => i.ip).Distinct().ToList() }).ToList();
                     saveCnts.apiCnt = apiCnt;