refactor: aop插入日志ip字段 非null

This commit is contained in:
Diego
2024-08-21 12:25:53 +08:00
parent 68f8ebb543
commit 6018f1e8ca
2 changed files with 2 additions and 2 deletions

View File

@@ -135,7 +135,7 @@ public class OperDescAttribute : MoAttribute
Name = (localizerType == null ? NetCoreApp.CreateLocalizerByType(typeof(OperDescAttribute)) : NetCoreApp.CreateLocalizerByType(localizerType))![Description],
Category = LogCateGoryEnum.Operate,
ExeStatus = true,
OpIp = AppService?.RemoteIpAddress?.MapToIPv4()?.ToString(),
OpIp = AppService?.RemoteIpAddress?.MapToIPv4()?.ToString() ?? string.Empty,
OpBrowser = clientInfo?.UA?.Family + clientInfo?.UA?.Major,
OpOs = clientInfo?.OS?.Family + clientInfo?.OS?.Major,
OpTime = DateTime.Now,

View File

@@ -10,7 +10,7 @@
<ProjectReference Include="$(SolutionDir)\tools\ThingsGateway.Razor\ThingsGateway.Razor.csproj" />
<ProjectReference Include="$(SolutionDir)\ThingsGateway.Admin.Application\ThingsGateway.Admin.Application.csproj" />
<PackageReference Include="BootstrapBlazor.Chart" Version="8.2.3" />
<PackageReference Include="BootstrapBlazor.TableExport" Version="8.1.0" />
<PackageReference Include="BootstrapBlazor.TableExport" Version="8.2.0" />
</ItemGroup>
<ItemGroup>