!60 update Yi.Abp.Net8/module/rbac/Yi.Framework.Rbac.Domain/Entities/LoginLogAggregateRoot.cs.
Merge pull request !60 from 凯明/N/A
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
using IPTools.Core;
|
using IPTools.Core;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using UAParser;
|
using UAParser;
|
||||||
@@ -74,9 +74,16 @@ namespace Yi.Framework.Rbac.Domain.Entities
|
|||||||
location = new IpInfo() { Province = "本地", City = "本机" };
|
location = new IpInfo() { Province = "本地", City = "本机" };
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
location = IpTool.Search(ipAddr);
|
location = IpTool.Search(ipAddr);
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
location = new IpInfo() { Province = ipAddr, City = "未知地区" };
|
||||||
|
}
|
||||||
|
}
|
||||||
ClientInfo clientInfo = GetClientInfo(context);
|
ClientInfo clientInfo = GetClientInfo(context);
|
||||||
LoginLogAggregateRoot entity = new()
|
LoginLogAggregateRoot entity = new()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user