😎1、优化访问日志刷新重复问题 2、升级依赖
This commit is contained in:
parent
44dbd9456a
commit
babe0280e3
@ -28,9 +28,9 @@
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.6.1" Aliases="BouncyCastleV2" />
|
||||
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.6" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.85" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.85" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.7.85" />
|
||||
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.9.7.86" />
|
||||
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.9.7.86" />
|
||||
<PackageReference Include="Furion.Pure" Version="4.9.7.86" />
|
||||
<PackageReference Include="Hardware.Info" Version="101.0.1.1" />
|
||||
<PackageReference Include="Hashids.net" Version="1.7.0" />
|
||||
<PackageReference Include="IPTools.China" Version="1.6.0" />
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Furion.Shapeless;
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
@ -166,11 +168,17 @@ public class DatabaseLoggingWriter : IDatabaseLoggingWriter, IDisposable
|
||||
}
|
||||
|
||||
// 记录访问日志-登录退出
|
||||
if (loggingMonitor.actionName == "userInfo" || loggingMonitor.actionName == "logout")
|
||||
if (loggingMonitor.actionName == "login" || loggingMonitor.actionName == "loginPhone" || loggingMonitor.actionName == "logout")
|
||||
{
|
||||
dynamic para = Clay.Parse((loggingMonitor.parameters == null || loggingMonitor.parameters.Count == 0) ? null : JSON.Serialize(loggingMonitor.parameters[0].value));
|
||||
if (loggingMonitor.actionName == "login")
|
||||
account = para.account;
|
||||
else if (loggingMonitor.actionName == "loginPhone")
|
||||
account = para.phone;
|
||||
|
||||
await _db.Insertable(new SysLogVis
|
||||
{
|
||||
ControllerName = loggingMonitor.controllerName,
|
||||
ControllerName = loggingMonitor.displayName,
|
||||
ActionName = loggingMonitor.actionTypeName,
|
||||
DisplayTitle = loggingMonitor.displayTitle,
|
||||
Status = loggingMonitor.returnInformation?.httpStatusCode,
|
||||
|
||||
@ -524,7 +524,9 @@ public static class CommonUtil
|
||||
{
|
||||
var ipInfo = IpTool.SearchWithI18N(ip); // 国际化查询,默认中文 中文zh-CN、英文en
|
||||
var addressList = new List<string>() { ipInfo.Country, ipInfo.Province, ipInfo.City, ipInfo.NetworkOperator };
|
||||
return (string.Join(" ", addressList.Where(u => u != "0" && !string.IsNullOrWhiteSpace(u)).ToList()), ipInfo.Longitude, ipInfo.Latitude); // 去掉0及空并用空格连接
|
||||
var location = string.Join(" ", addressList.Where(u => u != "0" && !string.IsNullOrWhiteSpace(u)).ToList()); // 去掉0及空并用空格连接
|
||||
if (string.IsNullOrWhiteSpace(location)) location = "本地";
|
||||
return (location, ipInfo.Longitude, ipInfo.Latitude);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.06.11",
|
||||
"lastBuildTime": "2025.06.14",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -18,8 +18,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@logicflow/core": "^2.0.15",
|
||||
"@logicflow/extension": "^2.0.20",
|
||||
"@logicflow/core": "^2.0.16",
|
||||
"@logicflow/extension": "^2.0.21",
|
||||
"@microsoft/signalr": "^8.0.7",
|
||||
"@vue-office/docx": "^1.6.2",
|
||||
"@vue-office/excel": "^1.7.14",
|
||||
@ -38,7 +38,7 @@
|
||||
"echarts": "^5.6.0",
|
||||
"echarts-gl": "^2.0.9",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "^2.10.1",
|
||||
"element-plus": "^2.10.2",
|
||||
"exceljs": "^4.4.0",
|
||||
"ezuikit-js": "^8.1.10",
|
||||
"flag-icons": "^7.5.0",
|
||||
@ -79,8 +79,8 @@
|
||||
"vue-router": "^4.5.1",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.6.20",
|
||||
"vxe-table": "^4.13.37",
|
||||
"vxe-pc-ui": "^4.6.21",
|
||||
"vxe-table": "^4.13.39",
|
||||
"xe-utils": "^3.7.5",
|
||||
"xlsx-js-style": "^1.2.0"
|
||||
},
|
||||
@ -88,7 +88,7 @@
|
||||
"@iconify/vue": "^5.0.0",
|
||||
"@plugin-web-update-notification/vite": "^2.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^22.15.30",
|
||||
"@types/node": "^22.15.31",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
||||
|
||||
@ -204,9 +204,9 @@ const options = useVxeTable<SysLogVis>(
|
||||
{ field: 'seq', type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||
{ field: 'logDateTime', title: '日志时间', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'displayTitle', title: '显示名称', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'actionName', title: '方法名称', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'controllerName', title: '方法名称', minWidth: 350, showOverflow: 'tooltip' },
|
||||
{ field: 'account', title: '账号名称', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'realName', title: '真实姓名', minWidth: 150, showOverflow: 'tooltip' },
|
||||
// { field: 'realName', title: '真实姓名', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'remoteIp', title: 'IP地址', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'location', title: '登录地点', minWidth: 150, showOverflow: 'tooltip' },
|
||||
{ field: 'longitude', title: '经度', minWidth: 100, showOverflow: 'tooltip' },
|
||||
|
||||
Loading…
Reference in New Issue
Block a user