Merge pull request '🍊 feat(Http): 新增远程请求配置以及请求日志,增强字典组件功能' (#410) from jasondom/Admin.NET.Pro:v2-2 into v2
Reviewed-on: https://code.adminnet.top/Admin.NET/Admin.NET.Pro/pulls/410
This commit is contained in:
commit
2c0067d563
1
.gitattributes
vendored
Normal file
1
.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
|
||||||
|
|
||||||
|
"HttpRemotes": {
|
||||||
|
"Proxy": { // 代理配置
|
||||||
|
"Encrypt": false,
|
||||||
|
"MaxRetries": 3,
|
||||||
|
"Address": "http://route.xiongmaodaili.com/xxxxxxxx",
|
||||||
|
"Account": "",
|
||||||
|
"Password": ""
|
||||||
|
},
|
||||||
|
"HttpBin": { // 测试接口服务配置
|
||||||
|
"EnabledLog": true,
|
||||||
|
"UseCookies": false,
|
||||||
|
"EnabledProxy": false,
|
||||||
|
"HttpName": "HTTP_BIN",
|
||||||
|
"BaseAddress": "http://httpbin.org/ip",
|
||||||
|
"Headers": {
|
||||||
|
"Connection": "Keep-Alive",
|
||||||
|
"Sec-Fetch-Mode": "cors",
|
||||||
|
"Sec-Fetch-Site": "same-origin",
|
||||||
|
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
|
||||||
|
},
|
||||||
|
"Timeout": 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -141,6 +141,11 @@ public class ConfigConst
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string SysOnlineNotice = "sys_online_notice";
|
public const string SysOnlineNotice = "sys_online_notice";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志
|
||||||
|
/// </summary>
|
||||||
|
public const string SysLogHttp = "sys_http_log";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 支付宝授权页面地址
|
/// 支付宝授权页面地址
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
97
Admin.NET/Admin.NET.Core/Entity/SysLogHttp.cs
Normal file
97
Admin.NET/Admin.NET.Core/Entity/SysLogHttp.cs
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Http请求日志表
|
||||||
|
/// </summary>
|
||||||
|
[SugarTable(null, "Http请求日志表")]
|
||||||
|
[SysTable]
|
||||||
|
[LogTable]
|
||||||
|
public partial class SysLogHttp : EntityBaseId
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求方式", Length = 8)]
|
||||||
|
[MaxLength(8)]
|
||||||
|
public string? HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否成功
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "是否成功")]
|
||||||
|
public YesNoEnum? IsSuccessStatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求地址", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求头
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求头", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求体
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "请求体", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? RequestBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应状态码
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "响应状态码")]
|
||||||
|
public HttpStatusCode? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应头
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "响应头", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ResponseHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应体
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "响应体", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? ResponseBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "异常信息", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||||
|
public string? Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "开始时间")]
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "结束时间")]
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时(毫秒)
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "耗时(毫秒)")]
|
||||||
|
public long? Elapsed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnDescription = "创建时间")]
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
}
|
||||||
@ -18,6 +18,20 @@ public class AppEventSubscriber : IEventSubscriber, ISingleton, IDisposable
|
|||||||
_serviceScope = scopeFactory.CreateScope();
|
_serviceScope = scopeFactory.CreateScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 增加Http日志
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[EventSubscribe(nameof(CreateHttpLog))]
|
||||||
|
public async Task CreateHttpLog(EventHandlerExecutingContext context)
|
||||||
|
{
|
||||||
|
var db = SqlSugarSetup.ITenant.IsAnyConnection(SqlSugarConst.LogConfigId)
|
||||||
|
? SqlSugarSetup.ITenant.GetConnectionScope(SqlSugarConst.LogConfigId)
|
||||||
|
: SqlSugarSetup.ITenant.GetConnectionScope(SqlSugarConst.MainConfigId);
|
||||||
|
await db.CopyNew().Insertable(context.GetPayload<SysLogHttp>()).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 增加异常日志
|
/// 增加异常日志
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
37
Admin.NET/Admin.NET.Core/Extension/HttpRemotesExtension.cs
Normal file
37
Admin.NET/Admin.NET.Core/Extension/HttpRemotesExtension.cs
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Http远程服务扩展
|
||||||
|
/// </summary>
|
||||||
|
public static class HttpRemotesExtension {
|
||||||
|
/// <summary>
|
||||||
|
/// 添加Http远程服务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="services"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static IServiceCollection AddHttpRemoteClientService(this IServiceCollection services)
|
||||||
|
{
|
||||||
|
var options = App.GetOptions<HttpRemotesOptions>();
|
||||||
|
foreach (var prop in options.GetType().GetProperties())
|
||||||
|
{
|
||||||
|
if (prop.GetValue(options) is not HttpRemoteItem opt) continue;
|
||||||
|
services.AddHttpClient(opt.HttpName, client =>
|
||||||
|
{
|
||||||
|
client.BaseAddress = new Uri(opt.BaseAddress);
|
||||||
|
client.Timeout = TimeSpan.FromSeconds(opt.Timeout);
|
||||||
|
foreach (var kv in opt.Headers) client.DefaultRequestHeaders.Add(kv.Key, kv.Value);
|
||||||
|
})
|
||||||
|
.AddHttpMessageHandler<HttpLoggingHandler>()
|
||||||
|
.ConfigurePrimaryHttpMessageHandler(() => new HttpClientHandler {
|
||||||
|
UseCookies = opt.UseCookies
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return services;
|
||||||
|
}
|
||||||
|
}
|
||||||
77
Admin.NET/Admin.NET.Core/Logging/HttpLoggingHandler.cs
Normal file
77
Admin.NET/Admin.NET.Core/Logging/HttpLoggingHandler.cs
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// 作者:Ir0nMax
|
||||||
|
// 时间:2025/03/05
|
||||||
|
// 邮箱:ir0nmax@wogof.com
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// http日志处理
|
||||||
|
/// </summary>
|
||||||
|
public class HttpLoggingHandler : DelegatingHandler, ITransient
|
||||||
|
{
|
||||||
|
private const string HttpName = "__HTTP_CLIENT_NAME__";
|
||||||
|
private readonly Dictionary<string, bool> _enabledLogMap;
|
||||||
|
private readonly SysConfigService _sysConfigService;
|
||||||
|
private readonly IEventPublisher _eventPublisher;
|
||||||
|
|
||||||
|
public HttpLoggingHandler(IEventPublisher eventPublisher, SysConfigService sysConfigService, IOptions<HttpRemotesOptions> options)
|
||||||
|
{
|
||||||
|
_eventPublisher = eventPublisher;
|
||||||
|
HttpRemotesOptions httpRemotesOptions = options.Value;
|
||||||
|
_sysConfigService = sysConfigService;
|
||||||
|
_enabledLogMap = typeof(HttpRemotesOptions).GetProperties()
|
||||||
|
.Where(u => u.PropertyType == typeof(HttpRemoteItem))
|
||||||
|
.ToDictionary(u => u.GetValue(httpRemotesOptions) is HttpRemoteItem opt ? opt.HttpName : "",
|
||||||
|
u => u.GetValue(httpRemotesOptions) is HttpRemoteItem { EnabledLog: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
// 判断全局Http日志开关
|
||||||
|
var enabledLog = await _sysConfigService.GetConfigValueByCode<bool>(ConfigConst.SysLogHttp);
|
||||||
|
if (!enabledLog) return await base.SendAsync(request, cancellationToken);
|
||||||
|
|
||||||
|
// 判断当前配置日志开关
|
||||||
|
request.Options.TryGetValue<string>(HttpName, out var clientName);
|
||||||
|
if (!string.IsNullOrWhiteSpace(clientName)) enabledLog = _enabledLogMap.GetOrDefault(clientName);
|
||||||
|
if (!enabledLog) return await base.SendAsync(request, cancellationToken);
|
||||||
|
|
||||||
|
var sysLogHttp = new SysLogHttp();
|
||||||
|
sysLogHttp.HttpMethod = request.Method.Method;
|
||||||
|
sysLogHttp.RequestUrl = request.RequestUri?.ToString();
|
||||||
|
sysLogHttp.RequestHeaders = request.Headers.ToDictionary(u => u.Key, u => u.Value.Join(";")).ToJson();
|
||||||
|
|
||||||
|
if (request.Content != null) sysLogHttp.RequestBody = await request.Content.ReadAsStringAsync(cancellationToken);
|
||||||
|
|
||||||
|
sysLogHttp.StartTime = DateTime.Now;
|
||||||
|
var stopWatch = Stopwatch.StartNew();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var response = await base.SendAsync(request, cancellationToken);
|
||||||
|
stopWatch.Stop();
|
||||||
|
sysLogHttp.EndTime = DateTime.Now;
|
||||||
|
sysLogHttp.ResponseHeaders = response.Headers.ToDictionary(u => u.Key, u => u.Value.Join(";")).ToJson();
|
||||||
|
sysLogHttp.IsSuccessStatusCode = response.IsSuccessStatusCode ? YesNoEnum.Y : YesNoEnum.N;
|
||||||
|
sysLogHttp.StatusCode = response.StatusCode;
|
||||||
|
|
||||||
|
sysLogHttp.ResponseBody = await response.Content.ReadAsStringAsync(cancellationToken);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
stopWatch.Stop();
|
||||||
|
sysLogHttp.EndTime = DateTime.Now;
|
||||||
|
sysLogHttp.IsSuccessStatusCode = YesNoEnum.N;
|
||||||
|
sysLogHttp.Exception = JSON.Serialize(SerializableException.FromException(ex));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
sysLogHttp.Elapsed = stopWatch.ElapsedMilliseconds;
|
||||||
|
await _eventPublisher.PublishAsync(nameof(AppEventSubscriber.CreateHttpLog), sysLogHttp, cancellationToken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
95
Admin.NET/Admin.NET.Core/Option/HttpRemotesOptions.cs
Normal file
95
Admin.NET/Admin.NET.Core/Option/HttpRemotesOptions.cs
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远程请求配置
|
||||||
|
/// </summary>
|
||||||
|
public sealed class HttpRemotesOptions : IConfigurableOptions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 代理配置
|
||||||
|
/// </summary>
|
||||||
|
public HttpProxyOption Proxy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取Ip地址接口
|
||||||
|
/// </summary>
|
||||||
|
public HttpRemoteItem HttpBin { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代理配置
|
||||||
|
/// </summary>
|
||||||
|
public class HttpProxyOption
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 是否加密
|
||||||
|
/// </summary>
|
||||||
|
public bool Encrypt { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大重试次数
|
||||||
|
/// </summary>
|
||||||
|
public string MaxRetries { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代理服务器地址
|
||||||
|
/// </summary>
|
||||||
|
public string Address { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代理服务器认证账号
|
||||||
|
/// </summary>
|
||||||
|
public string Account { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 代理服务器认证账号密码
|
||||||
|
/// </summary>
|
||||||
|
public string Password { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 远程请求配置项
|
||||||
|
/// </summary>
|
||||||
|
public sealed class HttpRemoteItem
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用日志
|
||||||
|
/// </summary>
|
||||||
|
public bool EnabledLog { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否启用代理
|
||||||
|
/// </summary>
|
||||||
|
public bool EnabledProxy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务名称
|
||||||
|
/// </summary>
|
||||||
|
public string HttpName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 服务地址
|
||||||
|
/// </summary>
|
||||||
|
public string BaseAddress { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求超时时间
|
||||||
|
/// </summary>
|
||||||
|
public int Timeout { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否自动处理Cookie
|
||||||
|
/// </summary>
|
||||||
|
public bool UseCookies { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求头
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, string> Headers { get; set; }
|
||||||
|
}
|
||||||
@ -42,6 +42,7 @@ public class SysConfigSeedData : ISqlSugarEntitySeedData<SysConfig>
|
|||||||
new SysConfig{ Id=1300000000281, Name="多语言切换", Code=ConfigConst.SysI18NSwitch, Value="True", SysFlag=YesNoEnum.Y, Remark="是否显示多语言切换按钮", OrderNo=230, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
|
new SysConfig{ Id=1300000000281, Name="多语言切换", Code=ConfigConst.SysI18NSwitch, Value="True", SysFlag=YesNoEnum.Y, Remark="是否显示多语言切换按钮", OrderNo=230, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
|
||||||
new SysConfig{ Id=1300000000291, Name="闲置超时时间", Code=ConfigConst.SysIdleTimeout, Value="0", SysFlag=YesNoEnum.Y, Remark="闲置超时时间(秒),超时强制退出,0 表示不限制", OrderNo=240, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
|
new SysConfig{ Id=1300000000291, Name="闲置超时时间", Code=ConfigConst.SysIdleTimeout, Value="0", SysFlag=YesNoEnum.Y, Remark="闲置超时时间(秒),超时强制退出,0 表示不限制", OrderNo=240, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2024-12-20 00:00:00") },
|
||||||
new SysConfig{ Id=1300000000301, Name="开启上线通知", Code=ConfigConst.SysOnlineNotice, Value="True", SysFlag=YesNoEnum.Y, Remark="开启用户上线、下线通知", OrderNo=250, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2025-06-06 00:00:00") },
|
new SysConfig{ Id=1300000000301, Name="开启上线通知", Code=ConfigConst.SysOnlineNotice, Value="True", SysFlag=YesNoEnum.Y, Remark="开启用户上线、下线通知", OrderNo=250, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2025-06-06 00:00:00") },
|
||||||
|
new SysConfig{ Id=1300000000302, Name="开启Http日志", Code=ConfigConst.SysLogHttp, Value="True", SysFlag=YesNoEnum.Y, Remark="开启远程请求日志记录功能", OrderNo=250, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2025-06-06 00:00:00") },
|
||||||
|
|
||||||
new SysConfig{ Id=1300000000999, Name="系统版本号", Code=ConfigConst.SysVersion, Value="v1.0", SysFlag=YesNoEnum.Y, Remark= "系统版本号", OrderNo=1000, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2025-04-10 00:00:00") },
|
new SysConfig{ Id=1300000000999, Name="系统版本号", Code=ConfigConst.SysVersion, Value="v1.0", SysFlag=YesNoEnum.Y, Remark= "系统版本号", OrderNo=1000, GroupCode=ConfigConst.SysDefaultGroup, CreateTime=DateTime.Parse("2025-04-10 00:00:00") },
|
||||||
];
|
];
|
||||||
|
|||||||
@ -212,6 +212,9 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
|||||||
new SysMenu{ Id=1310000000551, Pid=1310000000501, Title="消息日志", Path="/log/logmsg", Name="sysLogMsg", Component="/system/log/logmsg/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 },
|
new SysMenu{ Id=1310000000551, Pid=1310000000501, Title="消息日志", Path="/log/logmsg", Name="sysLogMsg", Component="/system/log/logmsg/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=140 },
|
||||||
new SysMenu{ Id=1310000000552, Pid=1310000000551, Title="查询", Permission="sysLogMsg/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
new SysMenu{ Id=1310000000552, Pid=1310000000551, Title="查询", Permission="sysLogMsg/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||||
new SysMenu{ Id=1310000000553, Pid=1310000000551, Title="清空", Permission="sysLogMsg/clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
new SysMenu{ Id=1310000000553, Pid=1310000000551, Title="清空", Permission="sysLogMsg/clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||||
|
new SysMenu{ Id=1310000000561, Pid=1310000000501, Title="请求日志", Path="/log/loghttp", Name="sysLogHttp", Component="/system/log/loghttp/index", Icon="ele-Document", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=150 },
|
||||||
|
new SysMenu{ Id=1310000000562, Pid=1310000000561, Title="查询", Permission="sysLogHttp/page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||||
|
new SysMenu{ Id=1310000000563, Pid=1310000000561, Title="清空", Permission="sysLogHttp/clear", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||||
|
|
||||||
new SysMenu{ Id=1310000000601, Pid=0, Title="开发工具", Path="/develop", Name="develop", Component="Layout", Icon="ele-Cpu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=13000 },
|
new SysMenu{ Id=1310000000601, Pid=0, Title="开发工具", Path="/develop", Name="develop", Component="Layout", Icon="ele-Cpu", Type=MenuTypeEnum.Dir, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=13000 },
|
||||||
new SysMenu{ Id=1310000000611, Pid=1310000000601, Title="库表管理", Path="/develop/database", Name="sysDatabase", Component="/system/database/index",Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
new SysMenu{ Id=1310000000611, Pid=1310000000601, Title="库表管理", Path="/develop/database", Name="sysDatabase", Component="/system/database/index",Icon="ele-Coin", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||||
|
|||||||
241
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogHttpInput.cs
Normal file
241
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogHttpInput.cs
Normal file
@ -0,0 +1,241 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志基础输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class LogHttpBaseInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
public virtual string HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否成功
|
||||||
|
/// </summary>
|
||||||
|
public virtual YesNoEnum? IsSuccessStatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
public virtual string RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求头
|
||||||
|
/// </summary>
|
||||||
|
public virtual string RequestHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求体
|
||||||
|
/// </summary>
|
||||||
|
public virtual string RequestBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应状态码
|
||||||
|
/// </summary>
|
||||||
|
public virtual int? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应头
|
||||||
|
/// </summary>
|
||||||
|
public virtual string ResponseHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应体
|
||||||
|
/// </summary>
|
||||||
|
public virtual string ResponseBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
public virtual string Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时(毫秒)
|
||||||
|
/// </summary>
|
||||||
|
public virtual long? Elapsed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public virtual DateTime? CreateTime { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志分页查询输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class PageLogHttpInput : BasePageInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 关键字查询
|
||||||
|
/// </summary>
|
||||||
|
public string SearchKey { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
public string HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否成功
|
||||||
|
/// </summary>
|
||||||
|
[Dict(nameof(YesNoEnum))]
|
||||||
|
public YesNoEnum? IsSuccessStatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
public string RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求体
|
||||||
|
/// </summary>
|
||||||
|
public string RequestBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应状态码
|
||||||
|
/// </summary>
|
||||||
|
public int? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应体
|
||||||
|
/// </summary>
|
||||||
|
public string ResponseBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
public string Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间范围
|
||||||
|
/// </summary>
|
||||||
|
public DateTime?[] CreateTimeRange { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志主键查询输入参数
|
||||||
|
/// </summary>
|
||||||
|
public class ExportLogHttpInput : PageLogHttpInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 需要导入的主键集
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(IsIgnore = true)]
|
||||||
|
[ExporterHeader(IsIgnore = true)]
|
||||||
|
public List<long> SelectKeyList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志数据导入实体
|
||||||
|
/// </summary>
|
||||||
|
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
|
||||||
|
public class ImportLogHttpInput : BaseImportInput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "请求方式")]
|
||||||
|
[ExporterHeader("请求方式", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否成功
|
||||||
|
/// </summary>
|
||||||
|
[Dict(nameof(YesNoEnum))]
|
||||||
|
[ImporterHeader(Name = "是否成功")]
|
||||||
|
[ExporterHeader("是否成功", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public YesNoEnum? IsSuccessStatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "请求地址")]
|
||||||
|
[ExporterHeader("请求地址", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求头
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "请求头")]
|
||||||
|
[ExporterHeader("请求头", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string RequestHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求体
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "请求体")]
|
||||||
|
[ExporterHeader("请求体", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string RequestBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应状态码
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "响应状态码")]
|
||||||
|
[ExporterHeader("响应状态码", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public int? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应头
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "响应头")]
|
||||||
|
[ExporterHeader("响应头", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string ResponseHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应体
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "响应体")]
|
||||||
|
[ExporterHeader("响应体", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string ResponseBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "异常信息")]
|
||||||
|
[ExporterHeader("异常信息", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public string Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "开始时间")]
|
||||||
|
[ExporterHeader("开始时间", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "结束时间")]
|
||||||
|
[ExporterHeader("结束时间", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时(毫秒)
|
||||||
|
/// </summary>
|
||||||
|
[ImporterHeader(Name = "耗时(毫秒)")]
|
||||||
|
[ExporterHeader("耗时(毫秒)", Format = "", Width = 25, IsBold = true)]
|
||||||
|
public long? Elapsed { get; set; }
|
||||||
|
}
|
||||||
94
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogHttpOutput.cs
Normal file
94
Admin.NET/Admin.NET.Core/Service/Log/Dto/LogHttpOutput.cs
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志输出参数
|
||||||
|
/// </summary>
|
||||||
|
public class PageLogHttpOutput
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 主键Id
|
||||||
|
/// </summary>
|
||||||
|
public long? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求方式
|
||||||
|
/// </summary>
|
||||||
|
public string HttpMethod { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否成功
|
||||||
|
/// </summary>
|
||||||
|
public YesNoEnum? IsSuccessStatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求地址
|
||||||
|
/// </summary>
|
||||||
|
public string RequestUrl { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求头
|
||||||
|
/// </summary>
|
||||||
|
public string RequestHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求体
|
||||||
|
/// </summary>
|
||||||
|
public string RequestBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应状态码
|
||||||
|
/// </summary>
|
||||||
|
public int? StatusCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应头
|
||||||
|
/// </summary>
|
||||||
|
public string ResponseHeaders { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 响应体
|
||||||
|
/// </summary>
|
||||||
|
public string ResponseBody { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 异常信息
|
||||||
|
/// </summary>
|
||||||
|
public string Exception { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 开始时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 结束时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 耗时(毫秒)
|
||||||
|
/// </summary>
|
||||||
|
public long? Elapsed { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志数据导出模板实体
|
||||||
|
/// </summary>
|
||||||
|
public class ExportLogHttpOutput : ImportLogHttpInput
|
||||||
|
{
|
||||||
|
[ImporterHeader(IsIgnore = true)]
|
||||||
|
[ExporterHeader(IsIgnore = true)]
|
||||||
|
public override string Error { get; set; }
|
||||||
|
}
|
||||||
124
Admin.NET/Admin.NET.Core/Service/Log/SysLogHttpService.cs
Normal file
124
Admin.NET/Admin.NET.Core/Service/Log/SysLogHttpService.cs
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
using System.Net;
|
||||||
|
|
||||||
|
namespace Admin.NET.Core.Service;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 请求日志服务 🧩
|
||||||
|
/// </summary>
|
||||||
|
[ApiDescriptionSettings(Order = 330, Description = "请求日志")]
|
||||||
|
public class SysLogHttpService : IDynamicApiController, ITransient
|
||||||
|
{
|
||||||
|
private readonly SqlSugarRepository<SysLogHttp> _sysLogHttpRep;
|
||||||
|
|
||||||
|
public SysLogHttpService(SqlSugarRepository<SysLogHttp> sysLogHttpRep, SysDictTypeService sysDictTypeService, ISqlSugarClient sqlSugarClient)
|
||||||
|
{
|
||||||
|
_sysLogHttpRep = sysLogHttpRep;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分页查询请求日志 🔖
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DisplayName("分页查询请求日志")]
|
||||||
|
[ApiDescriptionSettings(Name = "Page"), HttpPost]
|
||||||
|
public async Task<SqlSugarPagedList<PageLogHttpOutput>> Page(PageLogHttpInput input)
|
||||||
|
{
|
||||||
|
input.Keyword = input.Keyword?.Trim();
|
||||||
|
var query = _sysLogHttpRep.AsQueryable()
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), u => u.RequestUrl.Contains(input.Keyword) || u.RequestBody.Contains(input.Keyword) || u.ResponseBody.Contains(input.Keyword) || u.Exception.Contains(input.Keyword))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RequestUrl), u => u.RequestUrl.Contains(input.RequestUrl.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RequestBody), u => u.RequestBody.Contains(input.RequestBody.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.ResponseBody), u => u.ResponseBody.Contains(input.ResponseBody.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Exception), u => u.Exception.Contains(input.Exception.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.HttpMethod), u => u.HttpMethod == input.HttpMethod)
|
||||||
|
.WhereIF(input.IsSuccessStatusCode != null, u => u.IsSuccessStatusCode == input.IsSuccessStatusCode)
|
||||||
|
.WhereIF(input.StatusCode != null, u => u.StatusCode == (HttpStatusCode)input.StatusCode)
|
||||||
|
.WhereIF(input.CreateTimeRange?.Length == 2, u => u.CreateTime >= input.CreateTimeRange[0] && u.CreateTime <= input.CreateTimeRange[1])
|
||||||
|
.Select<PageLogHttpOutput>();
|
||||||
|
query = query.MergeTable();
|
||||||
|
return await query.OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取请求日志列表 🔖
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DisplayName("获取请求日志列表")]
|
||||||
|
[ApiDescriptionSettings(Name = "List"), HttpGet]
|
||||||
|
public async Task<List<SysLogHttp>> GetList([FromQuery] PageLogHttpInput input)
|
||||||
|
{
|
||||||
|
return await _sysLogHttpRep.AsQueryable()
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RequestUrl?.Trim()), u => u.RequestUrl.Contains(input.RequestUrl.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RequestBody?.Trim()), u => u.RequestBody.Contains(input.RequestBody.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.ResponseBody?.Trim()), u => u.ResponseBody.Contains(input.ResponseBody.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.Exception?.Trim()), u => u.Exception.Contains(input.Exception.Trim()))
|
||||||
|
.WhereIF(!string.IsNullOrWhiteSpace(input.HttpMethod?.Trim()), u => u.HttpMethod == input.HttpMethod)
|
||||||
|
.WhereIF(input.IsSuccessStatusCode != null, u => u.IsSuccessStatusCode == input.IsSuccessStatusCode)
|
||||||
|
.WhereIF(input.StatusCode != null, u => u.StatusCode == (HttpStatusCode)input.StatusCode)
|
||||||
|
.WhereIF(input.CreateTimeRange?.Length == 2, u => u.CreateTime >= input.CreateTimeRange[0] && u.CreateTime <= input.CreateTimeRange[1])
|
||||||
|
.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取请求日志详情 ℹ️
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DisplayName("获取请求日志详情")]
|
||||||
|
[ApiDescriptionSettings(Name = "Detail"), HttpGet]
|
||||||
|
public async Task<SysLogHttp> Detail([FromQuery] BaseIdInput input)
|
||||||
|
{
|
||||||
|
return await _sysLogHttpRep.GetFirstAsync(u => u.Id == input.Id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 按年按天数统计消息日志 🔖
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DisplayName("按年按天数统计消息日志")]
|
||||||
|
public async Task<List<StatLogOutput>> GetYearDayStats()
|
||||||
|
{
|
||||||
|
var _db = _sysLogHttpRep.AsSugarClient();
|
||||||
|
|
||||||
|
var now = DateTime.Now;
|
||||||
|
var days = (now - now.AddYears(-1)).Days + 1;
|
||||||
|
var day365 = Enumerable.Range(0, days).Select(u => now.AddDays(-u)).ToList();
|
||||||
|
var queryableLeft = _db.Reportable(day365).ToQueryable<DateTime>();
|
||||||
|
|
||||||
|
var queryableRight = _db.Queryable<SysLogHttp>(); //.SplitTable(tab => tab);
|
||||||
|
var list = await _db.Queryable(queryableLeft, queryableRight, JoinType.Left,
|
||||||
|
(x1, x2) => x1.ColumnName.Date == x2.CreateTime.Date)
|
||||||
|
.GroupBy((x1, x2) => x1.ColumnName)
|
||||||
|
.Select((x1, x2) => new StatLogOutput
|
||||||
|
{
|
||||||
|
Count = SqlFunc.AggregateSum(SqlFunc.IIF(x2.Id > 0, 1, 0)),
|
||||||
|
Date = x1.ColumnName.ToString("yyyy-MM-dd")
|
||||||
|
})
|
||||||
|
.MergeTable()
|
||||||
|
.OrderBy(x => x.Date)
|
||||||
|
.ToListAsync();
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 导出请求日志记录 🔖
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="input"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[DisplayName("导出请求日志记录")]
|
||||||
|
[ApiDescriptionSettings(Name = "Export"), HttpPost, NonUnify]
|
||||||
|
public async Task<IActionResult> Export(ExportLogHttpInput input)
|
||||||
|
{
|
||||||
|
var list = (await Page(input)).Items?.Adapt<List<ExportLogHttpOutput>>() ?? new();
|
||||||
|
if (input.SelectKeyList?.Count > 0) list = list.Where(x => input.SelectKeyList.Contains(x.Id)).ToList();
|
||||||
|
return ExcelHelper.ExportTemplate(list, "请求日志导出记录");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -437,6 +437,7 @@ public static class SqlSugarExtension
|
|||||||
// 执行前处理种子数据
|
// 执行前处理种子数据
|
||||||
if (handleBefore != null) foreach (var sd in seedData) handleBefore(sd);
|
if (handleBefore != null) foreach (var sd in seedData) handleBefore(sd);
|
||||||
|
|
||||||
|
dbProvider.QueryFilter.ClearAndBackup();
|
||||||
int total, insertCount = 0, updateCount = 0;
|
int total, insertCount = 0, updateCount = 0;
|
||||||
if (entityType.GetCustomAttribute<SplitTableAttribute>(true) != null)
|
if (entityType.GetCustomAttribute<SplitTableAttribute>(true) != null)
|
||||||
{
|
{
|
||||||
@ -476,6 +477,7 @@ public static class SqlSugarExtension
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
dbProvider.QueryFilter.Restore();
|
||||||
return (total, insertCount, updateCount);
|
return (total, insertCount, updateCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
29
Admin.NET/Admin.NET.Core/Utils/SerializableException.cs
Normal file
29
Admin.NET/Admin.NET.Core/Utils/SerializableException.cs
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||||
|
//
|
||||||
|
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||||
|
//
|
||||||
|
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||||
|
|
||||||
|
namespace Admin.NET.Core;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 可序列化的异常
|
||||||
|
/// </summary>
|
||||||
|
public class SerializableException
|
||||||
|
{
|
||||||
|
public string Message { get; set; }
|
||||||
|
public string StackTrace { get; set; }
|
||||||
|
public string Source { get; set; }
|
||||||
|
public string TypeName { get; set; }
|
||||||
|
|
||||||
|
public static SerializableException FromException(Exception ex)
|
||||||
|
{
|
||||||
|
return new SerializableException
|
||||||
|
{
|
||||||
|
Message = ex.Message,
|
||||||
|
StackTrace = ex.StackTrace,
|
||||||
|
Source = ex.Source,
|
||||||
|
TypeName = ex.GetType().FullName
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -38,6 +38,7 @@ public static class ProjectOptions
|
|||||||
services.AddConfigurableOptions<EventBusOptions>();
|
services.AddConfigurableOptions<EventBusOptions>();
|
||||||
services.AddConfigurableOptions<AlipayOptions>();
|
services.AddConfigurableOptions<AlipayOptions>();
|
||||||
services.AddConfigurableOptions<MqttOptions>();
|
services.AddConfigurableOptions<MqttOptions>();
|
||||||
|
services.AddConfigurableOptions<HttpRemotesOptions>();
|
||||||
services.Configure<IpRateLimitOptions>(App.Configuration.GetSection("IpRateLimiting"));
|
services.Configure<IpRateLimitOptions>(App.Configuration.GetSection("IpRateLimiting"));
|
||||||
services.Configure<IpRateLimitPolicies>(App.Configuration.GetSection("IpRateLimitPolicies"));
|
services.Configure<IpRateLimitPolicies>(App.Configuration.GetSection("IpRateLimitPolicies"));
|
||||||
services.Configure<ClientRateLimitOptions>(App.Configuration.GetSection("ClientRateLimiting"));
|
services.Configure<ClientRateLimitOptions>(App.Configuration.GetSection("ClientRateLimiting"));
|
||||||
|
|||||||
@ -32,6 +32,8 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
@ -317,6 +319,9 @@ public class Startup : AppStartup
|
|||||||
// 注册启动执行任务
|
// 注册启动执行任务
|
||||||
services.AddHostedService<StartHostedService>();
|
services.AddHostedService<StartHostedService>();
|
||||||
services.AddHostedService<MqttHostedService>();
|
services.AddHostedService<MqttHostedService>();
|
||||||
|
|
||||||
|
// 添加自定义的Http远程服务
|
||||||
|
services.AddHttpRemoteClientService();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||||
|
|||||||
@ -38,6 +38,7 @@ export * from './apis/sys-job-api';
|
|||||||
export * from './apis/sys-ldap-api';
|
export * from './apis/sys-ldap-api';
|
||||||
export * from './apis/sys-log-diff-api';
|
export * from './apis/sys-log-diff-api';
|
||||||
export * from './apis/sys-log-ex-api';
|
export * from './apis/sys-log-ex-api';
|
||||||
|
export * from './apis/sys-log-http-api';
|
||||||
export * from './apis/sys-log-msg-api';
|
export * from './apis/sys-log-msg-api';
|
||||||
export * from './apis/sys-log-op-api';
|
export * from './apis/sys-log-op-api';
|
||||||
export * from './apis/sys-log-vis-api';
|
export * from './apis/sys-log-vis-api';
|
||||||
|
|||||||
653
Web/src/api-services/system/apis/sys-log-http-api.ts
Normal file
653
Web/src/api-services/system/apis/sys-log-http-api.ts
Normal file
@ -0,0 +1,653 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
||||||
|
import { Configuration } from '../configuration';
|
||||||
|
// Some imports not used depending on template conditions
|
||||||
|
// @ts-ignore
|
||||||
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
||||||
|
import { AdminNETResultListStatLogOutput } from '../models';
|
||||||
|
import { AdminNETResultListSysLogHttp } from '../models';
|
||||||
|
import { AdminNETResultSqlSugarPagedListPageLogHttpOutput } from '../models';
|
||||||
|
import { AdminNETResultSysLogHttp } from '../models';
|
||||||
|
import { ExportLogHttpInput } from '../models';
|
||||||
|
import { Filter } from '../models';
|
||||||
|
import { FilterLogicEnum } from '../models';
|
||||||
|
import { FilterOperatorEnum } from '../models';
|
||||||
|
import { PageLogHttpInput } from '../models';
|
||||||
|
import { YesNoEnum } from '../models';
|
||||||
|
/**
|
||||||
|
* SysLogHttpApi - axios parameter creator
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SysLogHttpApiAxiosParamCreator = function (configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志详情 ℹ️
|
||||||
|
* @param {number} id 主键Id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysLogHttpDetailGet: async (id: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
// verify required parameter 'id' is not null or undefined
|
||||||
|
if (id === null || id === undefined) {
|
||||||
|
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysLogHttpDetailGet.');
|
||||||
|
}
|
||||||
|
const localVarPath = `/api/sysLogHttp/detail`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (id !== undefined) {
|
||||||
|
localVarQueryParameter['Id'] = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 导出请求日志记录 🔖
|
||||||
|
* @param {ExportLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysLogHttpExportPost: async (body?: ExportLogHttpInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/sysLogHttp/export`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||||
|
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志列表 🔖
|
||||||
|
* @param {string} [searchKey] 关键字查询
|
||||||
|
* @param {string} [httpMethod] 请求方式
|
||||||
|
* @param {YesNoEnum} [isSuccessStatusCode] 是否成功
|
||||||
|
* @param {string} [requestUrl] 请求地址
|
||||||
|
* @param {string} [requestBody] 请求体
|
||||||
|
* @param {number} [statusCode] 响应状态码
|
||||||
|
* @param {string} [responseBody] 响应体
|
||||||
|
* @param {string} [exception] 异常信息
|
||||||
|
* @param {Date} [createTime] 创建时间
|
||||||
|
* @param {Array<Date>} [createTimeRange] 创建时间范围
|
||||||
|
* @param {number} [page] 当前页码
|
||||||
|
* @param {number} [pageSize] 页码容量
|
||||||
|
* @param {string} [field] 排序字段
|
||||||
|
* @param {string} [order] 排序方向
|
||||||
|
* @param {string} [descStr] 降序排序
|
||||||
|
* @param {Array<string>} [searchFields] 字段名称集合
|
||||||
|
* @param {string} [searchKeyword] 关键字
|
||||||
|
* @param {string} [keyword] 模糊查询关键字
|
||||||
|
* @param {FilterLogicEnum} [filterLogic] 过滤条件
|
||||||
|
* @param {Array<Filter>} [filterFilters] 筛选过滤条件子项
|
||||||
|
* @param {string} [filterField] 字段名称
|
||||||
|
* @param {FilterOperatorEnum} [filterOperator] 逻辑运算符
|
||||||
|
* @param {any} [filterValue] 字段值
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysLogHttpListGet: async (searchKey?: string, httpMethod?: string, isSuccessStatusCode?: YesNoEnum, requestUrl?: string, requestBody?: string, statusCode?: number, responseBody?: string, exception?: string, createTime?: Date, createTimeRange?: Array<Date>, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/sysLogHttp/list`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchKey !== undefined) {
|
||||||
|
localVarQueryParameter['SearchKey'] = searchKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (httpMethod !== undefined) {
|
||||||
|
localVarQueryParameter['HttpMethod'] = httpMethod;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isSuccessStatusCode !== undefined) {
|
||||||
|
localVarQueryParameter['IsSuccessStatusCode'] = isSuccessStatusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requestUrl !== undefined) {
|
||||||
|
localVarQueryParameter['RequestUrl'] = requestUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (requestBody !== undefined) {
|
||||||
|
localVarQueryParameter['RequestBody'] = requestBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (statusCode !== undefined) {
|
||||||
|
localVarQueryParameter['StatusCode'] = statusCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (responseBody !== undefined) {
|
||||||
|
localVarQueryParameter['ResponseBody'] = responseBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exception !== undefined) {
|
||||||
|
localVarQueryParameter['Exception'] = exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (createTime !== undefined) {
|
||||||
|
localVarQueryParameter['CreateTime'] = (createTime as any instanceof Date) ?
|
||||||
|
(createTime as any).toISOString() :
|
||||||
|
createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (createTimeRange) {
|
||||||
|
localVarQueryParameter['CreateTimeRange'] = createTimeRange;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (page !== undefined) {
|
||||||
|
localVarQueryParameter['Page'] = page;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pageSize !== undefined) {
|
||||||
|
localVarQueryParameter['PageSize'] = pageSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (field !== undefined) {
|
||||||
|
localVarQueryParameter['Field'] = field;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (order !== undefined) {
|
||||||
|
localVarQueryParameter['Order'] = order;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (descStr !== undefined) {
|
||||||
|
localVarQueryParameter['DescStr'] = descStr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchFields) {
|
||||||
|
localVarQueryParameter['Search.Fields'] = searchFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchKeyword !== undefined) {
|
||||||
|
localVarQueryParameter['Search.Keyword'] = searchKeyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyword !== undefined) {
|
||||||
|
localVarQueryParameter['Keyword'] = keyword;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterLogic !== undefined) {
|
||||||
|
localVarQueryParameter['Filter.Logic'] = filterLogic;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterFilters) {
|
||||||
|
localVarQueryParameter['Filter.Filters'] = filterFilters;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterField !== undefined) {
|
||||||
|
localVarQueryParameter['Filter.Field'] = filterField;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterOperator !== undefined) {
|
||||||
|
localVarQueryParameter['Filter.Operator'] = filterOperator;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filterValue !== undefined) {
|
||||||
|
localVarQueryParameter['Filter.Value'] = filterValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 分页查询请求日志 🔖
|
||||||
|
* @param {PageLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysLogHttpPagePost: async (body?: PageLogHttpInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/sysLogHttp/page`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
||||||
|
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 按年按天数统计消息日志 🔖
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
apiSysLogHttpYearDayStatsGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||||
|
const localVarPath = `/api/sysLogHttp/yearDayStats`;
|
||||||
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||||
|
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
||||||
|
let baseOptions;
|
||||||
|
if (configuration) {
|
||||||
|
baseOptions = configuration.baseOptions;
|
||||||
|
}
|
||||||
|
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||||
|
const localVarHeaderParameter = {} as any;
|
||||||
|
const localVarQueryParameter = {} as any;
|
||||||
|
|
||||||
|
// authentication Bearer required
|
||||||
|
// http bearer authentication required
|
||||||
|
if (configuration && configuration.accessToken) {
|
||||||
|
const accessToken = typeof configuration.accessToken === 'function'
|
||||||
|
? await configuration.accessToken()
|
||||||
|
: await configuration.accessToken;
|
||||||
|
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||||
|
}
|
||||||
|
|
||||||
|
const query = new URLSearchParams(localVarUrlObj.search);
|
||||||
|
for (const key in localVarQueryParameter) {
|
||||||
|
query.set(key, localVarQueryParameter[key]);
|
||||||
|
}
|
||||||
|
for (const key in options.params) {
|
||||||
|
query.set(key, options.params[key]);
|
||||||
|
}
|
||||||
|
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
||||||
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||||
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||||
|
options: localVarRequestOptions,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SysLogHttpApi - functional programming interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SysLogHttpApiFp = function(configuration?: Configuration) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志详情 ℹ️
|
||||||
|
* @param {number} id 主键Id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpDetailGet(id: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSysLogHttp>>> {
|
||||||
|
const localVarAxiosArgs = await SysLogHttpApiAxiosParamCreator(configuration).apiSysLogHttpDetailGet(id, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 导出请求日志记录 🔖
|
||||||
|
* @param {ExportLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpExportPost(body?: ExportLogHttpInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||||
|
const localVarAxiosArgs = await SysLogHttpApiAxiosParamCreator(configuration).apiSysLogHttpExportPost(body, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志列表 🔖
|
||||||
|
* @param {string} [searchKey] 关键字查询
|
||||||
|
* @param {string} [httpMethod] 请求方式
|
||||||
|
* @param {YesNoEnum} [isSuccessStatusCode] 是否成功
|
||||||
|
* @param {string} [requestUrl] 请求地址
|
||||||
|
* @param {string} [requestBody] 请求体
|
||||||
|
* @param {number} [statusCode] 响应状态码
|
||||||
|
* @param {string} [responseBody] 响应体
|
||||||
|
* @param {string} [exception] 异常信息
|
||||||
|
* @param {Date} [createTime] 创建时间
|
||||||
|
* @param {Array<Date>} [createTimeRange] 创建时间范围
|
||||||
|
* @param {number} [page] 当前页码
|
||||||
|
* @param {number} [pageSize] 页码容量
|
||||||
|
* @param {string} [field] 排序字段
|
||||||
|
* @param {string} [order] 排序方向
|
||||||
|
* @param {string} [descStr] 降序排序
|
||||||
|
* @param {Array<string>} [searchFields] 字段名称集合
|
||||||
|
* @param {string} [searchKeyword] 关键字
|
||||||
|
* @param {string} [keyword] 模糊查询关键字
|
||||||
|
* @param {FilterLogicEnum} [filterLogic] 过滤条件
|
||||||
|
* @param {Array<Filter>} [filterFilters] 筛选过滤条件子项
|
||||||
|
* @param {string} [filterField] 字段名称
|
||||||
|
* @param {FilterOperatorEnum} [filterOperator] 逻辑运算符
|
||||||
|
* @param {any} [filterValue] 字段值
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpListGet(searchKey?: string, httpMethod?: string, isSuccessStatusCode?: YesNoEnum, requestUrl?: string, requestBody?: string, statusCode?: number, responseBody?: string, exception?: string, createTime?: Date, createTimeRange?: Array<Date>, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListSysLogHttp>>> {
|
||||||
|
const localVarAxiosArgs = await SysLogHttpApiAxiosParamCreator(configuration).apiSysLogHttpListGet(searchKey, httpMethod, isSuccessStatusCode, requestUrl, requestBody, statusCode, responseBody, exception, createTime, createTimeRange, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 分页查询请求日志 🔖
|
||||||
|
* @param {PageLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpPagePost(body?: PageLogHttpInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageLogHttpOutput>>> {
|
||||||
|
const localVarAxiosArgs = await SysLogHttpApiAxiosParamCreator(configuration).apiSysLogHttpPagePost(body, options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 按年按天数统计消息日志 🔖
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpYearDayStatsGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminNETResultListStatLogOutput>>> {
|
||||||
|
const localVarAxiosArgs = await SysLogHttpApiAxiosParamCreator(configuration).apiSysLogHttpYearDayStatsGet(options);
|
||||||
|
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||||
|
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||||
|
return axios.request(axiosRequestArgs);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SysLogHttpApi - factory interface
|
||||||
|
* @export
|
||||||
|
*/
|
||||||
|
export const SysLogHttpApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
||||||
|
return {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志详情 ℹ️
|
||||||
|
* @param {number} id 主键Id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpDetailGet(id: number, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSysLogHttp>> {
|
||||||
|
return SysLogHttpApiFp(configuration).apiSysLogHttpDetailGet(id, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 导出请求日志记录 🔖
|
||||||
|
* @param {ExportLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpExportPost(body?: ExportLogHttpInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||||
|
return SysLogHttpApiFp(configuration).apiSysLogHttpExportPost(body, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志列表 🔖
|
||||||
|
* @param {string} [searchKey] 关键字查询
|
||||||
|
* @param {string} [httpMethod] 请求方式
|
||||||
|
* @param {YesNoEnum} [isSuccessStatusCode] 是否成功
|
||||||
|
* @param {string} [requestUrl] 请求地址
|
||||||
|
* @param {string} [requestBody] 请求体
|
||||||
|
* @param {number} [statusCode] 响应状态码
|
||||||
|
* @param {string} [responseBody] 响应体
|
||||||
|
* @param {string} [exception] 异常信息
|
||||||
|
* @param {Date} [createTime] 创建时间
|
||||||
|
* @param {Array<Date>} [createTimeRange] 创建时间范围
|
||||||
|
* @param {number} [page] 当前页码
|
||||||
|
* @param {number} [pageSize] 页码容量
|
||||||
|
* @param {string} [field] 排序字段
|
||||||
|
* @param {string} [order] 排序方向
|
||||||
|
* @param {string} [descStr] 降序排序
|
||||||
|
* @param {Array<string>} [searchFields] 字段名称集合
|
||||||
|
* @param {string} [searchKeyword] 关键字
|
||||||
|
* @param {string} [keyword] 模糊查询关键字
|
||||||
|
* @param {FilterLogicEnum} [filterLogic] 过滤条件
|
||||||
|
* @param {Array<Filter>} [filterFilters] 筛选过滤条件子项
|
||||||
|
* @param {string} [filterField] 字段名称
|
||||||
|
* @param {FilterOperatorEnum} [filterOperator] 逻辑运算符
|
||||||
|
* @param {any} [filterValue] 字段值
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpListGet(searchKey?: string, httpMethod?: string, isSuccessStatusCode?: YesNoEnum, requestUrl?: string, requestBody?: string, statusCode?: number, responseBody?: string, exception?: string, createTime?: Date, createTimeRange?: Array<Date>, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListSysLogHttp>> {
|
||||||
|
return SysLogHttpApiFp(configuration).apiSysLogHttpListGet(searchKey, httpMethod, isSuccessStatusCode, requestUrl, requestBody, statusCode, responseBody, exception, createTime, createTimeRange, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 分页查询请求日志 🔖
|
||||||
|
* @param {PageLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpPagePost(body?: PageLogHttpInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageLogHttpOutput>> {
|
||||||
|
return SysLogHttpApiFp(configuration).apiSysLogHttpPagePost(body, options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 按年按天数统计消息日志 🔖
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
*/
|
||||||
|
async apiSysLogHttpYearDayStatsGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminNETResultListStatLogOutput>> {
|
||||||
|
return SysLogHttpApiFp(configuration).apiSysLogHttpYearDayStatsGet(options).then((request) => request(axios, basePath));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SysLogHttpApi - object-oriented interface
|
||||||
|
* @export
|
||||||
|
* @class SysLogHttpApi
|
||||||
|
* @extends {BaseAPI}
|
||||||
|
*/
|
||||||
|
export class SysLogHttpApi extends BaseAPI {
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志详情 ℹ️
|
||||||
|
* @param {number} id 主键Id
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysLogHttpApi
|
||||||
|
*/
|
||||||
|
public async apiSysLogHttpDetailGet(id: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSysLogHttp>> {
|
||||||
|
return SysLogHttpApiFp(this.configuration).apiSysLogHttpDetailGet(id, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 导出请求日志记录 🔖
|
||||||
|
* @param {ExportLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysLogHttpApi
|
||||||
|
*/
|
||||||
|
public async apiSysLogHttpExportPost(body?: ExportLogHttpInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||||
|
return SysLogHttpApiFp(this.configuration).apiSysLogHttpExportPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 获取请求日志列表 🔖
|
||||||
|
* @param {string} [searchKey] 关键字查询
|
||||||
|
* @param {string} [httpMethod] 请求方式
|
||||||
|
* @param {YesNoEnum} [isSuccessStatusCode] 是否成功
|
||||||
|
* @param {string} [requestUrl] 请求地址
|
||||||
|
* @param {string} [requestBody] 请求体
|
||||||
|
* @param {number} [statusCode] 响应状态码
|
||||||
|
* @param {string} [responseBody] 响应体
|
||||||
|
* @param {string} [exception] 异常信息
|
||||||
|
* @param {Date} [createTime] 创建时间
|
||||||
|
* @param {Array<Date>} [createTimeRange] 创建时间范围
|
||||||
|
* @param {number} [page] 当前页码
|
||||||
|
* @param {number} [pageSize] 页码容量
|
||||||
|
* @param {string} [field] 排序字段
|
||||||
|
* @param {string} [order] 排序方向
|
||||||
|
* @param {string} [descStr] 降序排序
|
||||||
|
* @param {Array<string>} [searchFields] 字段名称集合
|
||||||
|
* @param {string} [searchKeyword] 关键字
|
||||||
|
* @param {string} [keyword] 模糊查询关键字
|
||||||
|
* @param {FilterLogicEnum} [filterLogic] 过滤条件
|
||||||
|
* @param {Array<Filter>} [filterFilters] 筛选过滤条件子项
|
||||||
|
* @param {string} [filterField] 字段名称
|
||||||
|
* @param {FilterOperatorEnum} [filterOperator] 逻辑运算符
|
||||||
|
* @param {any} [filterValue] 字段值
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysLogHttpApi
|
||||||
|
*/
|
||||||
|
public async apiSysLogHttpListGet(searchKey?: string, httpMethod?: string, isSuccessStatusCode?: YesNoEnum, requestUrl?: string, requestBody?: string, statusCode?: number, responseBody?: string, exception?: string, createTime?: Date, createTimeRange?: Array<Date>, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, searchFields?: Array<string>, searchKeyword?: string, keyword?: string, filterLogic?: FilterLogicEnum, filterFilters?: Array<Filter>, filterField?: string, filterOperator?: FilterOperatorEnum, filterValue?: any, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListSysLogHttp>> {
|
||||||
|
return SysLogHttpApiFp(this.configuration).apiSysLogHttpListGet(searchKey, httpMethod, isSuccessStatusCode, requestUrl, requestBody, statusCode, responseBody, exception, createTime, createTimeRange, page, pageSize, field, order, descStr, searchFields, searchKeyword, keyword, filterLogic, filterFilters, filterField, filterOperator, filterValue, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 分页查询请求日志 🔖
|
||||||
|
* @param {PageLogHttpInput} [body]
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysLogHttpApi
|
||||||
|
*/
|
||||||
|
public async apiSysLogHttpPagePost(body?: PageLogHttpInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultSqlSugarPagedListPageLogHttpOutput>> {
|
||||||
|
return SysLogHttpApiFp(this.configuration).apiSysLogHttpPagePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @summary 按年按天数统计消息日志 🔖
|
||||||
|
* @param {*} [options] Override http request option.
|
||||||
|
* @throws {RequiredError}
|
||||||
|
* @memberof SysLogHttpApi
|
||||||
|
*/
|
||||||
|
public async apiSysLogHttpYearDayStatsGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminNETResultListStatLogOutput>> {
|
||||||
|
return SysLogHttpApiFp(this.configuration).apiSysLogHttpYearDayStatsGet(options).then((request) => request(this.axios, this.basePath));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { SysLogHttp } from './sys-log-http';
|
||||||
|
/**
|
||||||
|
* 全局返回结果
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
export interface AdminNETResultListSysLogHttp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型success、warning、error
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
type?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
message?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据
|
||||||
|
*
|
||||||
|
* @type {Array<SysLogHttp>}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
result?: Array<SysLogHttp> | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附加数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
extras?: any | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof AdminNETResultListSysLogHttp
|
||||||
|
*/
|
||||||
|
time?: Date;
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { SqlSugarPagedListPageLogHttpOutput } from './sql-sugar-paged-list-page-log-http-output';
|
||||||
|
/**
|
||||||
|
* 全局返回结果
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
export interface AdminNETResultSqlSugarPagedListPageLogHttpOutput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型success、warning、error
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
type?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
message?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {SqlSugarPagedListPageLogHttpOutput}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
result?: SqlSugarPagedListPageLogHttpOutput;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附加数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
extras?: any | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof AdminNETResultSqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
time?: Date;
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { SysLogHttp } from './sys-log-http';
|
||||||
|
/**
|
||||||
|
* 全局返回结果
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
export interface AdminNETResultSysLogHttp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
code?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类型success、warning、error
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
type?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 错误信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
message?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {SysLogHttp}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
result?: SysLogHttp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附加数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
extras?: any | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof AdminNETResultSysLogHttp
|
||||||
|
*/
|
||||||
|
time?: Date;
|
||||||
|
}
|
||||||
171
Web/src/api-services/system/models/export-log-http-input.ts
Normal file
171
Web/src/api-services/system/models/export-log-http-input.ts
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Filter } from './filter';
|
||||||
|
import { Search } from './search';
|
||||||
|
import { YesNoEnum } from './yes-no-enum';
|
||||||
|
/**
|
||||||
|
* 请求日志主键查询输入参数
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
export interface ExportLogHttpInput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Search}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
search?: Search;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模糊查询关键字
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
keyword?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Filter}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
filter?: Filter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
page?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页码容量
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序字段
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
field?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序方向
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
order?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 降序排序
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
descStr?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字查询
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
searchKey?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
httpMethod?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {YesNoEnum}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
isSuccessStatusCode?: YesNoEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
requestUrl?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
requestBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
statusCode?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
responseBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
exception?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
createTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间范围
|
||||||
|
*
|
||||||
|
* @type {Array<Date>}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
createTimeRange?: Array<Date> | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需要导入的主键集
|
||||||
|
*
|
||||||
|
* @type {Array<number>}
|
||||||
|
* @memberof ExportLogHttpInput
|
||||||
|
*/
|
||||||
|
selectKeyList?: Array<number> | null;
|
||||||
|
}
|
||||||
83
Web/src/api-services/system/models/http-status-code.ts
Normal file
83
Web/src/api-services/system/models/http-status-code.ts
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @enum {string}
|
||||||
|
*/
|
||||||
|
export enum HttpStatusCode {
|
||||||
|
NUMBER_100 = 100,
|
||||||
|
NUMBER_101 = 101,
|
||||||
|
NUMBER_102 = 102,
|
||||||
|
NUMBER_103 = 103,
|
||||||
|
NUMBER_200 = 200,
|
||||||
|
NUMBER_201 = 201,
|
||||||
|
NUMBER_202 = 202,
|
||||||
|
NUMBER_203 = 203,
|
||||||
|
NUMBER_204 = 204,
|
||||||
|
NUMBER_205 = 205,
|
||||||
|
NUMBER_206 = 206,
|
||||||
|
NUMBER_207 = 207,
|
||||||
|
NUMBER_208 = 208,
|
||||||
|
NUMBER_226 = 226,
|
||||||
|
NUMBER_300 = 300,
|
||||||
|
NUMBER_301 = 301,
|
||||||
|
NUMBER_302 = 302,
|
||||||
|
NUMBER_303 = 303,
|
||||||
|
NUMBER_304 = 304,
|
||||||
|
NUMBER_305 = 305,
|
||||||
|
NUMBER_306 = 306,
|
||||||
|
NUMBER_307 = 307,
|
||||||
|
NUMBER_308 = 308,
|
||||||
|
NUMBER_400 = 400,
|
||||||
|
NUMBER_401 = 401,
|
||||||
|
NUMBER_402 = 402,
|
||||||
|
NUMBER_403 = 403,
|
||||||
|
NUMBER_404 = 404,
|
||||||
|
NUMBER_405 = 405,
|
||||||
|
NUMBER_406 = 406,
|
||||||
|
NUMBER_407 = 407,
|
||||||
|
NUMBER_408 = 408,
|
||||||
|
NUMBER_409 = 409,
|
||||||
|
NUMBER_410 = 410,
|
||||||
|
NUMBER_411 = 411,
|
||||||
|
NUMBER_412 = 412,
|
||||||
|
NUMBER_413 = 413,
|
||||||
|
NUMBER_414 = 414,
|
||||||
|
NUMBER_415 = 415,
|
||||||
|
NUMBER_416 = 416,
|
||||||
|
NUMBER_417 = 417,
|
||||||
|
NUMBER_421 = 421,
|
||||||
|
NUMBER_422 = 422,
|
||||||
|
NUMBER_423 = 423,
|
||||||
|
NUMBER_424 = 424,
|
||||||
|
NUMBER_426 = 426,
|
||||||
|
NUMBER_428 = 428,
|
||||||
|
NUMBER_429 = 429,
|
||||||
|
NUMBER_431 = 431,
|
||||||
|
NUMBER_451 = 451,
|
||||||
|
NUMBER_500 = 500,
|
||||||
|
NUMBER_501 = 501,
|
||||||
|
NUMBER_502 = 502,
|
||||||
|
NUMBER_503 = 503,
|
||||||
|
NUMBER_504 = 504,
|
||||||
|
NUMBER_505 = 505,
|
||||||
|
NUMBER_506 = 506,
|
||||||
|
NUMBER_507 = 507,
|
||||||
|
NUMBER_508 = 508,
|
||||||
|
NUMBER_510 = 510,
|
||||||
|
NUMBER_511 = 511
|
||||||
|
}
|
||||||
|
|
||||||
@ -80,6 +80,7 @@ export * from './admin-netresult-list-sys-file';
|
|||||||
export * from './admin-netresult-list-sys-job-cluster';
|
export * from './admin-netresult-list-sys-job-cluster';
|
||||||
export * from './admin-netresult-list-sys-job-trigger';
|
export * from './admin-netresult-list-sys-job-trigger';
|
||||||
export * from './admin-netresult-list-sys-ldap';
|
export * from './admin-netresult-list-sys-ldap';
|
||||||
|
export * from './admin-netresult-list-sys-log-http';
|
||||||
export * from './admin-netresult-list-sys-menu';
|
export * from './admin-netresult-list-sys-menu';
|
||||||
export * from './admin-netresult-list-sys-notice';
|
export * from './admin-netresult-list-sys-notice';
|
||||||
export * from './admin-netresult-list-sys-org';
|
export * from './admin-netresult-list-sys-org';
|
||||||
@ -103,6 +104,7 @@ export * from './admin-netresult-sql-sugar-paged-list-chat-list-output';
|
|||||||
export * from './admin-netresult-sql-sugar-paged-list-job-detail-output';
|
export * from './admin-netresult-sql-sugar-paged-list-job-detail-output';
|
||||||
export * from './admin-netresult-sql-sugar-paged-list-oauth-user-output';
|
export * from './admin-netresult-sql-sugar-paged-list-oauth-user-output';
|
||||||
export * from './admin-netresult-sql-sugar-paged-list-open-access-output';
|
export * from './admin-netresult-sql-sugar-paged-list-open-access-output';
|
||||||
|
export * from './admin-netresult-sql-sugar-paged-list-page-log-http-output';
|
||||||
export * from './admin-netresult-sql-sugar-paged-list-page-pos-output';
|
export * from './admin-netresult-sql-sugar-paged-list-page-pos-output';
|
||||||
export * from './admin-netresult-sql-sugar-paged-list-page-role-output';
|
export * from './admin-netresult-sql-sugar-paged-list-page-role-output';
|
||||||
export * from './admin-netresult-sql-sugar-paged-list-page-serial-output';
|
export * from './admin-netresult-sql-sugar-paged-list-page-serial-output';
|
||||||
@ -142,6 +144,7 @@ export * from './admin-netresult-sys-file';
|
|||||||
export * from './admin-netresult-sys-ldap';
|
export * from './admin-netresult-sys-ldap';
|
||||||
export * from './admin-netresult-sys-log-diff';
|
export * from './admin-netresult-sys-log-diff';
|
||||||
export * from './admin-netresult-sys-log-ex';
|
export * from './admin-netresult-sys-log-ex';
|
||||||
|
export * from './admin-netresult-sys-log-http';
|
||||||
export * from './admin-netresult-sys-log-msg';
|
export * from './admin-netresult-sys-log-msg';
|
||||||
export * from './admin-netresult-sys-log-op';
|
export * from './admin-netresult-sys-log-op';
|
||||||
export * from './admin-netresult-sys-notice';
|
export * from './admin-netresult-sys-notice';
|
||||||
@ -256,6 +259,7 @@ export * from './enum-entity';
|
|||||||
export * from './enum-type-output';
|
export * from './enum-type-output';
|
||||||
export * from './event-attributes';
|
export * from './event-attributes';
|
||||||
export * from './event-info';
|
export * from './event-info';
|
||||||
|
export * from './export-log-http-input';
|
||||||
export * from './export-proc-by-tmpinput';
|
export * from './export-proc-by-tmpinput';
|
||||||
export * from './export-proc-input';
|
export * from './export-proc-input';
|
||||||
export * from './ext-user-info';
|
export * from './ext-user-info';
|
||||||
@ -283,6 +287,7 @@ export * from './goods-detail';
|
|||||||
export * from './gpu-info';
|
export * from './gpu-info';
|
||||||
export * from './grant-role-output';
|
export * from './grant-role-output';
|
||||||
export * from './http-method-enum';
|
export * from './http-method-enum';
|
||||||
|
export * from './http-status-code';
|
||||||
export * from './iaction-result';
|
export * from './iaction-result';
|
||||||
export * from './icomponent';
|
export * from './icomponent';
|
||||||
export * from './icontainer';
|
export * from './icontainer';
|
||||||
@ -363,6 +368,8 @@ export * from './page-file-input';
|
|||||||
export * from './page-job-detail-input';
|
export * from './page-job-detail-input';
|
||||||
export * from './page-job-trigger-record-input';
|
export * from './page-job-trigger-record-input';
|
||||||
export * from './page-ldap-input';
|
export * from './page-ldap-input';
|
||||||
|
export * from './page-log-http-input';
|
||||||
|
export * from './page-log-http-output';
|
||||||
export * from './page-log-input';
|
export * from './page-log-input';
|
||||||
export * from './page-msg-log-input';
|
export * from './page-msg-log-input';
|
||||||
export * from './page-notice-input';
|
export * from './page-notice-input';
|
||||||
@ -436,6 +443,7 @@ export * from './sql-sugar-paged-list-chat-list-output';
|
|||||||
export * from './sql-sugar-paged-list-job-detail-output';
|
export * from './sql-sugar-paged-list-job-detail-output';
|
||||||
export * from './sql-sugar-paged-list-oauth-user-output';
|
export * from './sql-sugar-paged-list-oauth-user-output';
|
||||||
export * from './sql-sugar-paged-list-open-access-output';
|
export * from './sql-sugar-paged-list-open-access-output';
|
||||||
|
export * from './sql-sugar-paged-list-page-log-http-output';
|
||||||
export * from './sql-sugar-paged-list-page-pos-output';
|
export * from './sql-sugar-paged-list-page-pos-output';
|
||||||
export * from './sql-sugar-paged-list-page-role-output';
|
export * from './sql-sugar-paged-list-page-role-output';
|
||||||
export * from './sql-sugar-paged-list-page-serial-output';
|
export * from './sql-sugar-paged-list-page-serial-output';
|
||||||
@ -493,6 +501,7 @@ export * from './sys-job-trigger-record';
|
|||||||
export * from './sys-ldap';
|
export * from './sys-ldap';
|
||||||
export * from './sys-log-diff';
|
export * from './sys-log-diff';
|
||||||
export * from './sys-log-ex';
|
export * from './sys-log-ex';
|
||||||
|
export * from './sys-log-http';
|
||||||
export * from './sys-log-msg';
|
export * from './sys-log-msg';
|
||||||
export * from './sys-log-op';
|
export * from './sys-log-op';
|
||||||
export * from './sys-log-vis';
|
export * from './sys-log-vis';
|
||||||
|
|||||||
163
Web/src/api-services/system/models/page-log-http-input.ts
Normal file
163
Web/src/api-services/system/models/page-log-http-input.ts
Normal file
@ -0,0 +1,163 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { Filter } from './filter';
|
||||||
|
import { Search } from './search';
|
||||||
|
import { YesNoEnum } from './yes-no-enum';
|
||||||
|
/**
|
||||||
|
* 请求日志分页查询输入参数
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface PageLogHttpInput
|
||||||
|
*/
|
||||||
|
export interface PageLogHttpInput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Search}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
search?: Search;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模糊查询关键字
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
keyword?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {Filter}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
filter?: Filter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
page?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页码容量
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序字段
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
field?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序方向
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
order?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 降序排序
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
descStr?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关键字查询
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
searchKey?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
httpMethod?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {YesNoEnum}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
isSuccessStatusCode?: YesNoEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
requestUrl?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
requestBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
statusCode?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
responseBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
exception?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
createTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间范围
|
||||||
|
*
|
||||||
|
* @type {Array<Date>}
|
||||||
|
* @memberof PageLogHttpInput
|
||||||
|
*/
|
||||||
|
createTimeRange?: Array<Date> | null;
|
||||||
|
}
|
||||||
133
Web/src/api-services/system/models/page-log-http-output.ts
Normal file
133
Web/src/api-services/system/models/page-log-http-output.ts
Normal file
@ -0,0 +1,133 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { YesNoEnum } from './yes-no-enum';
|
||||||
|
/**
|
||||||
|
* 请求日志输出参数
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
export interface PageLogHttpOutput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键Id
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
id?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
httpMethod?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {YesNoEnum}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
isSuccessStatusCode?: YesNoEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
requestUrl?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求头
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
requestHeaders?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
requestBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应状态码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
statusCode?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应头
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
responseHeaders?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
responseBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
exception?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
startTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
endTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗时(毫秒)
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
elapsed?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof PageLogHttpOutput
|
||||||
|
*/
|
||||||
|
createTime?: Date | null;
|
||||||
|
}
|
||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListChatListOutput {
|
|||||||
* @memberof SqlSugarPagedListChatListOutput
|
* @memberof SqlSugarPagedListChatListOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListChatListOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListJobDetailOutput {
|
|||||||
* @memberof SqlSugarPagedListJobDetailOutput
|
* @memberof SqlSugarPagedListJobDetailOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListJobDetailOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListOAuthUserOutput {
|
|||||||
* @memberof SqlSugarPagedListOAuthUserOutput
|
* @memberof SqlSugarPagedListOAuthUserOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListOAuthUserOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListOpenAccessOutput {
|
|||||||
* @memberof SqlSugarPagedListOpenAccessOutput
|
* @memberof SqlSugarPagedListOpenAccessOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListOpenAccessOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,87 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { PageLogHttpOutput } from './page-log-http-output';
|
||||||
|
/**
|
||||||
|
* 分页泛型集合
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
export interface SqlSugarPagedListPageLogHttpOutput {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页码
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
page?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页容量
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
pageSize?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总条数
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
total?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总页数
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
totalPages?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前页集合
|
||||||
|
*
|
||||||
|
* @type {Array<PageLogHttpOutput>}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
items?: Array<PageLogHttpOutput> | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有上一页
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
hasPrevPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否有下一页
|
||||||
|
*
|
||||||
|
* @type {boolean}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListPageLogHttpOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
|
}
|
||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListPagePosOutput {
|
|||||||
* @memberof SqlSugarPagedListPagePosOutput
|
* @memberof SqlSugarPagedListPagePosOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListPagePosOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListPageRoleOutput {
|
|||||||
* @memberof SqlSugarPagedListPageRoleOutput
|
* @memberof SqlSugarPagedListPageRoleOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListPageRoleOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListPageSerialOutput {
|
|||||||
* @memberof SqlSugarPagedListPageSerialOutput
|
* @memberof SqlSugarPagedListPageSerialOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListPageSerialOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListReportConfigOutput {
|
|||||||
* @memberof SqlSugarPagedListReportConfigOutput
|
* @memberof SqlSugarPagedListReportConfigOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListReportConfigOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysCodeGen {
|
|||||||
* @memberof SqlSugarPagedListSysCodeGen
|
* @memberof SqlSugarPagedListSysCodeGen
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysCodeGen
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysConfigTenant {
|
|||||||
* @memberof SqlSugarPagedListSysConfigTenant
|
* @memberof SqlSugarPagedListSysConfigTenant
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysConfigTenant
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysConfig {
|
|||||||
* @memberof SqlSugarPagedListSysConfig
|
* @memberof SqlSugarPagedListSysConfig
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysConfig
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysDictData {
|
|||||||
* @memberof SqlSugarPagedListSysDictData
|
* @memberof SqlSugarPagedListSysDictData
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysDictData
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysDictType {
|
|||||||
* @memberof SqlSugarPagedListSysDictType
|
* @memberof SqlSugarPagedListSysDictType
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysDictType
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysFile {
|
|||||||
* @memberof SqlSugarPagedListSysFile
|
* @memberof SqlSugarPagedListSysFile
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysFile
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysJobTriggerRecord {
|
|||||||
* @memberof SqlSugarPagedListSysJobTriggerRecord
|
* @memberof SqlSugarPagedListSysJobTriggerRecord
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysJobTriggerRecord
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLdap {
|
|||||||
* @memberof SqlSugarPagedListSysLdap
|
* @memberof SqlSugarPagedListSysLdap
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLdap
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLogDiff {
|
|||||||
* @memberof SqlSugarPagedListSysLogDiff
|
* @memberof SqlSugarPagedListSysLogDiff
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLogDiff
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLogEx {
|
|||||||
* @memberof SqlSugarPagedListSysLogEx
|
* @memberof SqlSugarPagedListSysLogEx
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLogEx
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLogMsg {
|
|||||||
* @memberof SqlSugarPagedListSysLogMsg
|
* @memberof SqlSugarPagedListSysLogMsg
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLogMsg
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLogOp {
|
|||||||
* @memberof SqlSugarPagedListSysLogOp
|
* @memberof SqlSugarPagedListSysLogOp
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLogOp
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysLogVis {
|
|||||||
* @memberof SqlSugarPagedListSysLogVis
|
* @memberof SqlSugarPagedListSysLogVis
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysLogVis
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysNoticeUser {
|
|||||||
* @memberof SqlSugarPagedListSysNoticeUser
|
* @memberof SqlSugarPagedListSysNoticeUser
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysNoticeUser
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysNotice {
|
|||||||
* @memberof SqlSugarPagedListSysNotice
|
* @memberof SqlSugarPagedListSysNotice
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysNotice
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysPlugin {
|
|||||||
* @memberof SqlSugarPagedListSysPlugin
|
* @memberof SqlSugarPagedListSysPlugin
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysPlugin
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysPrint {
|
|||||||
* @memberof SqlSugarPagedListSysPrint
|
* @memberof SqlSugarPagedListSysPrint
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysPrint
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysRegion {
|
|||||||
* @memberof SqlSugarPagedListSysRegion
|
* @memberof SqlSugarPagedListSysRegion
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysRegion
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysReportDataSource {
|
|||||||
* @memberof SqlSugarPagedListSysReportDataSource
|
* @memberof SqlSugarPagedListSysReportDataSource
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysReportDataSource
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysUpgrade {
|
|||||||
* @memberof SqlSugarPagedListSysUpgrade
|
* @memberof SqlSugarPagedListSysUpgrade
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysUpgrade
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListSysWechatPay {
|
|||||||
* @memberof SqlSugarPagedListSysWechatPay
|
* @memberof SqlSugarPagedListSysWechatPay
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListSysWechatPay
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListTenantOutput {
|
|||||||
* @memberof SqlSugarPagedListTenantOutput
|
* @memberof SqlSugarPagedListTenantOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListTenantOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,4 +76,12 @@ export interface SqlSugarPagedListUserOutput {
|
|||||||
* @memberof SqlSugarPagedListUserOutput
|
* @memberof SqlSugarPagedListUserOutput
|
||||||
*/
|
*/
|
||||||
hasNextPage?: boolean;
|
hasNextPage?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
*
|
||||||
|
* @type {any}
|
||||||
|
* @memberof SqlSugarPagedListUserOutput
|
||||||
|
*/
|
||||||
|
totalInfo?: any | null;
|
||||||
}
|
}
|
||||||
|
|||||||
132
Web/src/api-services/system/models/sys-log-http.ts
Normal file
132
Web/src/api-services/system/models/sys-log-http.ts
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
/* tslint:disable */
|
||||||
|
/* eslint-disable */
|
||||||
|
/**
|
||||||
|
* Admin.NET 通用权限开发平台
|
||||||
|
* 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!</font></b></u>
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { HttpStatusCode } from './http-status-code';
|
||||||
|
import { YesNoEnum } from './yes-no-enum';
|
||||||
|
/**
|
||||||
|
* Http请求日志表
|
||||||
|
*
|
||||||
|
* @export
|
||||||
|
* @interface SysLogHttp
|
||||||
|
*/
|
||||||
|
export interface SysLogHttp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 雪花Id
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
id?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求方式
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
httpMethod?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {YesNoEnum}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
isSuccessStatusCode?: YesNoEnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求地址
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
requestUrl?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求头
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
requestHeaders?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 请求体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
requestBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {HttpStatusCode}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
statusCode?: HttpStatusCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应头
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
responseHeaders?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 响应体
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
responseBody?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常信息
|
||||||
|
*
|
||||||
|
* @type {string}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
exception?: string | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 开始时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
startTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 结束时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
endTime?: Date | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 耗时(毫秒)
|
||||||
|
*
|
||||||
|
* @type {number}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
elapsed?: number | null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*
|
||||||
|
* @type {Date}
|
||||||
|
* @memberof SysLogHttp
|
||||||
|
*/
|
||||||
|
createTime?: Date;
|
||||||
|
}
|
||||||
@ -15,7 +15,7 @@
|
|||||||
* @type {Array}
|
* @type {Array}
|
||||||
* @constant
|
* @constant
|
||||||
*/
|
*/
|
||||||
const RENDER_TYPES = ['tag', 'select', 'radio', 'checkbox', 'radio-button'] as const;
|
const RENDER_TYPES = ['tag', 'select', 'radio', 'checkbox', 'checkbox-button', 'radio-button'] as const;
|
||||||
type RenderType = (typeof RENDER_TYPES)[number];
|
type RenderType = (typeof RENDER_TYPES)[number];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -40,10 +40,22 @@ interface DictItem {
|
|||||||
tagType?: TagType;
|
tagType?: TagType;
|
||||||
styleSetting?: string;
|
styleSetting?: string;
|
||||||
classSetting?: string;
|
classSetting?: string;
|
||||||
|
disabled?: boolean;
|
||||||
label?: string;
|
label?: string;
|
||||||
value?: string | number;
|
value?: string | number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 互斥选项配置
|
||||||
|
* @type {Object}
|
||||||
|
* @property {string|number} value - 触发互斥的选项值
|
||||||
|
* @property {Array<string|number>} excludes - 被互斥的选项值列表
|
||||||
|
*/
|
||||||
|
interface MutexConfig {
|
||||||
|
value: string | number;
|
||||||
|
excludes: (string | number)[];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选值模式枚举
|
* 多选值模式枚举
|
||||||
* @enum {string}
|
* @enum {string}
|
||||||
@ -81,11 +93,7 @@ import { reactive, watch, computed, PropType } from 'vue';
|
|||||||
import { useUserInfo } from '/@/stores/userInfo';
|
import { useUserInfo } from '/@/stores/userInfo';
|
||||||
|
|
||||||
const userStore = useUserInfo();
|
const userStore = useUserInfo();
|
||||||
const emit = defineEmits(['update:modelValue']);
|
const emit = defineEmits(['update:modelValue', 'change']);
|
||||||
|
|
||||||
const isEmpty = (value: any) => {
|
|
||||||
return value == null || value === '' || value === undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件属性定义
|
* 组件属性定义
|
||||||
@ -210,6 +218,19 @@ const props = defineProps({
|
|||||||
default: MultipleModel.Array,
|
default: MultipleModel.Array,
|
||||||
validator: isMultipleModel,
|
validator: isMultipleModel,
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 互斥配置项(仅在多选模式下有效)
|
||||||
|
* @type {Array<MutexConfig>}
|
||||||
|
* @example
|
||||||
|
* :mutex-configs="[
|
||||||
|
* { value: 'all', excludes: ['1', '2', '3'] },
|
||||||
|
* { value: '1', excludes: ['all'] }
|
||||||
|
* ]"
|
||||||
|
*/
|
||||||
|
mutexConfigs: {
|
||||||
|
type: Array as PropType<MutexConfig[]>,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -218,11 +239,26 @@ const props = defineProps({
|
|||||||
* @returns {DictItem[]} - 过滤并格式化后的字典数据
|
* @returns {DictItem[]} - 过滤并格式化后的字典数据
|
||||||
*/
|
*/
|
||||||
const formattedDictData = computed(() => {
|
const formattedDictData = computed(() => {
|
||||||
return state.dictData.filter(props.onItemFilter).map((item) => ({
|
const baseData = state.dictData.filter(props.onItemFilter).map((item) => ({
|
||||||
...item,
|
...item,
|
||||||
label: item[props.propLabel],
|
label: item[props.propLabel],
|
||||||
value: item[props.propValue],
|
value: item[props.propValue],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// 如果没有互斥配置或多选模式,直接返回基础数据
|
||||||
|
if (!props.multiple || !props.mutexConfigs || props.mutexConfigs.length === 0) {
|
||||||
|
return baseData;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理互斥逻辑,设置禁用状态
|
||||||
|
return baseData.map((item) => {
|
||||||
|
// 检查当前项是否应该被禁用
|
||||||
|
const isDisabled = isItemDisabled(item.value, state.value, props.mutexConfigs);
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
disabled: isDisabled || item.disabled, // 保持原有的disabled状态
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -231,7 +267,7 @@ const formattedDictData = computed(() => {
|
|||||||
* @returns {DictItem|DictItem[]|null} - 当前选中的字典项或字典项数组
|
* @returns {DictItem|DictItem[]|null} - 当前选中的字典项或字典项数组
|
||||||
*/
|
*/
|
||||||
const currentDictItems = computed(() => {
|
const currentDictItems = computed(() => {
|
||||||
if (isEmpty(state.value)) return null;
|
if (!state.value) return null;
|
||||||
|
|
||||||
if (Array.isArray(state.value)) {
|
if (Array.isArray(state.value)) {
|
||||||
// 确保回显时也去重
|
// 确保回显时也去重
|
||||||
@ -250,8 +286,8 @@ const currentDictItems = computed(() => {
|
|||||||
*/
|
*/
|
||||||
const getDataList = (): DictItem[] => {
|
const getDataList = (): DictItem[] => {
|
||||||
try {
|
try {
|
||||||
if (isEmpty(props.code)) {
|
if (!props.code) {
|
||||||
console.error('字典编码不能为空');
|
console.error('[g-sys-dict] 字典编码不能为空');
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,7 +300,7 @@ const getDataList = (): DictItem[] => {
|
|||||||
value: item[props.propValue] ?? item.code,
|
value: item[props.propValue] ?? item.code,
|
||||||
}));
|
}));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(`获取字典[${props.code}]数据失败:`, error);
|
console.error(`[g-sys-dict] 获取字典[${props.code}]数据失败:`, error);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -277,7 +313,7 @@ const getDataList = (): DictItem[] => {
|
|||||||
const processNumericValues = (value: any) => {
|
const processNumericValues = (value: any) => {
|
||||||
if (typeof value === 'number' || (Array.isArray(value) && typeof value[0] === 'number')) {
|
if (typeof value === 'number' || (Array.isArray(value) && typeof value[0] === 'number')) {
|
||||||
state.dictData.forEach((item) => {
|
state.dictData.forEach((item) => {
|
||||||
if (!isEmpty(item.value)) {
|
if (item.value) {
|
||||||
item.value = Number(item.value);
|
item.value = Number(item.value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -292,7 +328,7 @@ const processNumericValues = (value: any) => {
|
|||||||
*/
|
*/
|
||||||
const parseMultipleValue = (value: any): any => {
|
const parseMultipleValue = (value: any): any => {
|
||||||
// 处理空值情况
|
// 处理空值情况
|
||||||
if (isEmpty(value)) {
|
if (value === null || value === undefined || value === '') {
|
||||||
return props.multiple ? [] : value;
|
return props.multiple ? [] : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,12 +339,7 @@ const parseMultipleValue = (value: any): any => {
|
|||||||
// 处理JSON数组格式
|
// 处理JSON数组格式
|
||||||
if (trimmedValue.startsWith('[') && trimmedValue.endsWith(']')) {
|
if (trimmedValue.startsWith('[') && trimmedValue.endsWith(']')) {
|
||||||
try {
|
try {
|
||||||
const parsed = JSON.parse(trimmedValue);
|
return JSON.parse(trimmedValue);
|
||||||
if (Array.isArray(parsed)) {
|
|
||||||
// 去重处理
|
|
||||||
return [...new Set(parsed.filter(Boolean))];
|
|
||||||
}
|
|
||||||
return parsed;
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('[g-sys-dict] 解析多选值失败:', error);
|
console.warn('[g-sys-dict] 解析多选值失败:', error);
|
||||||
return [];
|
return [];
|
||||||
@ -317,54 +348,104 @@ const parseMultipleValue = (value: any): any => {
|
|||||||
|
|
||||||
// 处理逗号分隔格式
|
// 处理逗号分隔格式
|
||||||
if (props.multipleModel === MultipleModel.Comma && trimmedValue.includes(',')) {
|
if (props.multipleModel === MultipleModel.Comma && trimmedValue.includes(',')) {
|
||||||
// 去重处理
|
return trimmedValue.split(',');
|
||||||
return [
|
|
||||||
...new Set(
|
|
||||||
trimmedValue
|
|
||||||
.split(',')
|
|
||||||
.map((item) => item.trim())
|
|
||||||
.filter(Boolean)
|
|
||||||
),
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理单个值情况
|
// 处理单个值情况
|
||||||
return props.multiple ? [trimmedValue] : trimmedValue;
|
return props.multiple ? [trimmedValue] : trimmedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理数组值 - 添加去重
|
|
||||||
if (Array.isArray(value)) {
|
|
||||||
return [...new Set(value.filter(Boolean))];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 其他情况直接返回
|
// 其他情况直接返回
|
||||||
return value;
|
return value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查选项是否应该被禁用
|
||||||
|
* @function
|
||||||
|
* @param {string|number} itemValue - 当前选项的值
|
||||||
|
* @param {any} currentValue - 当前选中的值
|
||||||
|
* @param {MutexConfig[]} mutexConfigs - 互斥配置列表
|
||||||
|
* @returns {boolean} - 是否应该禁用
|
||||||
|
*/
|
||||||
|
const isItemDisabled = (itemValue: string | number, currentValue: any, mutexConfigs: MutexConfig[]): boolean => {
|
||||||
|
// 如果没有配置互斥规则,不禁用任何项
|
||||||
|
if (!mutexConfigs || mutexConfigs.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取当前选中的值数组
|
||||||
|
const selectedValues = Array.isArray(currentValue) ? currentValue : currentValue ? [currentValue] : [];
|
||||||
|
|
||||||
|
// 检查每个互斥配置
|
||||||
|
for (const config of mutexConfigs) {
|
||||||
|
// 如果互斥触发项已被选中,且当前项是被互斥项,则禁用
|
||||||
|
if (selectedValues.includes(config.value) && config.excludes.includes(itemValue)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果当前项是互斥触发项,且有被互斥项被选中,则禁用
|
||||||
|
if (itemValue === config.value && config.excludes.some((exclude) => selectedValues.includes(exclude))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 互斥处理函数
|
||||||
|
* @function
|
||||||
|
* @param {any} newValue - 新选中的值
|
||||||
|
* @param {MutexConfig[]} mutexConfigs - 互斥配置列表
|
||||||
|
* @returns {any} - 处理后的值
|
||||||
|
*/
|
||||||
|
const handleMutex = (newValue: any, mutexConfigs: MutexConfig[]): any => {
|
||||||
|
// 如果没有配置互斥规则,直接返回原值
|
||||||
|
if (!mutexConfigs || mutexConfigs.length === 0) return newValue;
|
||||||
|
|
||||||
|
// 如果是单选模式,直接返回
|
||||||
|
if (!props.multiple) return newValue;
|
||||||
|
|
||||||
|
// 对于禁用模式,我们只需要确保新值是有效的(即没有违反互斥规则)
|
||||||
|
// 实际的禁用逻辑在formattedDictData中处理
|
||||||
|
let resultValue = Array.isArray(newValue) ? [...newValue] : newValue ? [newValue] : [];
|
||||||
|
|
||||||
|
// 过滤掉无效的值(可能由于异步更新导致的无效选择)
|
||||||
|
const validValues = formattedDictData.value.filter((item) => !item.disabled).map((item) => item.value);
|
||||||
|
|
||||||
|
return resultValue.filter((val) => validValues.includes(val));
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新绑定值(修复逗号模式问题)
|
* 更新绑定值(修复逗号模式问题)
|
||||||
* @function
|
* @function
|
||||||
* @param {any} newValue - 新值
|
* @param {any} newValue - 新值
|
||||||
*/
|
*/
|
||||||
const updateValue = (newValue: any) => {
|
const updateValue = (newValue: any) => {
|
||||||
// 先对值进行去重处理
|
// 如果有互斥配置,先处理互斥
|
||||||
let processedValue = newValue;
|
let processedValue = newValue;
|
||||||
if (Array.isArray(newValue)) {
|
if (props.mutexConfigs && props.mutexConfigs.length > 0) {
|
||||||
processedValue = [...new Set(newValue.filter((v) => v !== null && v !== undefined && v !== ''))];
|
processedValue = handleMutex(newValue, props.mutexConfigs);
|
||||||
}
|
}
|
||||||
|
|
||||||
let emitValue = processedValue;
|
let emitValue = processedValue;
|
||||||
|
|
||||||
if (props.multipleModel === MultipleModel.Comma) {
|
if (props.multipleModel === MultipleModel.Comma) {
|
||||||
if (Array.isArray(processedValue)) {
|
if (Array.isArray(processedValue)) {
|
||||||
emitValue = processedValue.length > 0 ? processedValue.join(',') : '';
|
emitValue = processedValue.length > 0 ? processedValue.sort().join(',') : undefined;
|
||||||
} else if (isEmpty(processedValue)) {
|
} else if (processedValue === null || processedValue === undefined) {
|
||||||
emitValue = '';
|
emitValue = undefined;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (Array.isArray(processedValue)) {
|
||||||
|
emitValue = processedValue.length > 0 ? processedValue.sort() : undefined;
|
||||||
|
} else if (processedValue === null || processedValue === undefined) {
|
||||||
|
emitValue = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
state.value = processedValue;
|
state.value = processedValue;
|
||||||
emit('update:modelValue', emitValue);
|
emit('update:modelValue', emitValue === '' ? undefined : emitValue);
|
||||||
|
emit('change', state.value, state.dictData);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -402,6 +483,27 @@ const initData = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验初始值对应的选项是否存在
|
||||||
|
* @function
|
||||||
|
*/
|
||||||
|
const validateInitialValue = () => {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
if (props.renderAs === 'tag' || !state.value) return resolve(undefined);
|
||||||
|
if (Array.isArray(state.value)) {
|
||||||
|
const errorValues = state.value.filter(val => state.dictData.find(e => e[props.propValue] == val) === undefined);
|
||||||
|
if (errorValues && errorValues.length > 0) {
|
||||||
|
reject(`[g-sys-dict] 未匹配到选项值:${JSON.stringify(errorValues)}`);
|
||||||
|
}
|
||||||
|
} else if (state.value) {
|
||||||
|
if (!state.dictData.find(e => e[props.propValue] === state.value)) {
|
||||||
|
reject(`[g-sys-dict] 未匹配到选项值:${state.value}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resolve(undefined);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 组件状态
|
* 组件状态
|
||||||
* @property {DictItem[]} dictData - 原始字典数据
|
* @property {DictItem[]} dictData - 原始字典数据
|
||||||
@ -413,14 +515,11 @@ const state = reactive({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// 监听数据变化
|
// 监听数据变化
|
||||||
watch(
|
watch(() => props.modelValue, (newValue) => {
|
||||||
() => props.modelValue,
|
|
||||||
(newValue) => {
|
|
||||||
state.value = parseMultipleValue(newValue);
|
state.value = parseMultipleValue(newValue);
|
||||||
}
|
validateInitialValue();
|
||||||
);
|
});
|
||||||
|
watch(() => [userStore.dictList, userStore.constList, state], initData, { immediate: true });
|
||||||
watch(() => [userStore.dictList, userStore.constList], initData, { immediate: true });
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -440,13 +539,18 @@ watch(() => [userStore.dictList, userStore.constList], initData, { immediate: tr
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 渲染选择器 -->
|
<!-- 渲染选择器 -->
|
||||||
<el-select v-else-if="props.renderAs === 'select'" v-model="state.value" v-bind="$attrs" :multiple="props.multiple" @change="updateValue" filterable clearable>
|
<el-select v-else-if="props.renderAs === 'select'" v-model="state.value" v-bind="$attrs" :multiple="props.multiple" @change="updateValue" clearable>
|
||||||
<el-option v-for="(item, index) in formattedDictData" :key="index" :label="getDisplayText(item)" :value="item.value" />
|
<el-option v-for="(item, index) in formattedDictData" :key="index" :label="getDisplayText(item)" :value="item.value" :disabled="item.disabled" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<!-- 渲染复选框(多选) -->
|
<!-- 多选框(多选) -->
|
||||||
<el-checkbox-group v-else-if="props.renderAs === 'checkbox'" v-model="state.value" v-bind="$attrs" @change="updateValue">
|
<el-checkbox-group v-else-if="props.renderAs === 'checkbox'" v-model="state.value" v-bind="$attrs" @change="updateValue">
|
||||||
<el-checkbox-button v-for="(item, index) in formattedDictData" :key="index" :value="item.value">
|
<el-checkbox v-for="(item, index) in formattedDictData" :key="index" :value="item.value" :label="getDisplayText(item)" :disabled="item.disabled" />
|
||||||
|
</el-checkbox-group>
|
||||||
|
|
||||||
|
<!-- 多选框-按钮(多选) -->
|
||||||
|
<el-checkbox-group v-else-if="props.renderAs === 'checkbox-button'" v-model="state.value" v-bind="$attrs" @change="updateValue">
|
||||||
|
<el-checkbox-button v-for="(item, index) in formattedDictData" :key="index" :value="item.value" :disabled="item.disabled">
|
||||||
{{ getDisplayText(item) }}
|
{{ getDisplayText(item) }}
|
||||||
</el-checkbox-button>
|
</el-checkbox-button>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
|||||||
86
Web/src/views/system/log/loghttp/component/logDetail.vue
Normal file
86
Web/src/views/system/log/loghttp/component/logDetail.vue
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="state.visible" draggable overflow destroy-on-close>
|
||||||
|
<template #header>
|
||||||
|
<div style="color: #fff">
|
||||||
|
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Document /> </el-icon>
|
||||||
|
<span> 日志详情 </span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<el-scrollbar height="calc(100vh - 250px)">
|
||||||
|
<el-form :model="data" label-width="auto">
|
||||||
|
<el-tabs v-model="state.selectedTabName">
|
||||||
|
<el-tab-pane label="请求信息">
|
||||||
|
<el-form-item label="请求地址">
|
||||||
|
{{ data.requestUrl?.indexOf('?') == -1 ? data.requestUrl : data.requestUrl?.substring(0, data.requestUrl.indexOf('?')) }}
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="Query参数" v-if="data.requestUrl?.indexOf('?') != -1">
|
||||||
|
<el-row v-for="(value, key, index) in queryObject">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-input :value="key" readonly>
|
||||||
|
</el-input>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="20">
|
||||||
|
<vue-json-pretty :data="tryJsonParse(value)" showLength showIcon showSelectController />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="请求头">
|
||||||
|
<vue-json-pretty :data="data.requestHeaders" showLength showIcon showLineNumber showSelectController />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="请求体">
|
||||||
|
<vue-json-pretty :data="data.requestBody" showLength showIcon showLineNumber showSelectController />
|
||||||
|
</el-form-item>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="响应信息">
|
||||||
|
<el-form-item label="响应头">
|
||||||
|
<vue-json-pretty :data="data.responseHeaders" showLength showIcon showLineNumber showSelectController />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="响应体">
|
||||||
|
<vue-json-pretty :data="data.responseBody" showLength showIcon showLineNumber showSelectController />
|
||||||
|
</el-form-item>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="异常信息" v-if="data.exception">
|
||||||
|
<vue-json-pretty :data="data.exception" showLength showIcon showLineNumber showSelectController />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-form>
|
||||||
|
</el-scrollbar>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="state.visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import {ref, reactive, computed} from 'vue';
|
||||||
|
import { StringToObj } from '/@/utils/json-utils';
|
||||||
|
import VueJsonPretty from 'vue-json-pretty';
|
||||||
|
import { LogHttp } from '/@/api-services/system';
|
||||||
|
const state = reactive({
|
||||||
|
visible: false,
|
||||||
|
selectedTabName: '0',
|
||||||
|
});
|
||||||
|
const data = ref<LogHttp>({});
|
||||||
|
const openDialog = (row: any) => {
|
||||||
|
state.visible = true;
|
||||||
|
data.value ??= {};
|
||||||
|
state.selectedTabName = '0';
|
||||||
|
data.value.requestUrl = StringToObj(row.requestUrl);
|
||||||
|
data.value.requestHeaders = StringToObj(row.requestHeaders);
|
||||||
|
data.value.requestBody = StringToObj(row.requestBody);
|
||||||
|
data.value.responseHeaders = StringToObj(row.responseHeaders);
|
||||||
|
data.value.responseBody = StringToObj(row.responseBody);
|
||||||
|
data.value.exception = StringToObj(row.exception);
|
||||||
|
};
|
||||||
|
|
||||||
|
const queryObject = computed(() => Object.fromEntries(new URLSearchParams(new URL(data.value?.requestUrl ?? '').search)) ?? {});
|
||||||
|
const tryJsonParse = (str: string) => {
|
||||||
|
try {
|
||||||
|
return JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
defineExpose({
|
||||||
|
openDialog,
|
||||||
|
});
|
||||||
|
</script>
|
||||||
326
Web/src/views/system/log/loghttp/index.vue
Normal file
326
Web/src/views/system/log/loghttp/index.vue
Normal file
@ -0,0 +1,326 @@
|
|||||||
|
<template>
|
||||||
|
<div class="sys-sysLogHttp-container">
|
||||||
|
<el-card shadow="hover" :body-style="{ padding: '5px 5px 0 5px' }">
|
||||||
|
<scEcharts v-if="echartsOption.series.data" height="200px" :option="echartsOption" @clickData="clickData"></scEcharts>
|
||||||
|
</el-card>
|
||||||
|
<el-card shadow="hover" :body-style="{ padding: '5px', display: 'flex', width: '100%', height: '100%', alignItems: 'start' }">
|
||||||
|
<el-form :model="state.queryParams" ref="queryForm" :show-message="false" :inlineMessage="true" label-width="auto" style="flex: 1 1 0%">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="请求方式" prop="httpMethod">
|
||||||
|
<el-input v-model="state.queryParams.httpMethod" placeholder="请输入请求方式" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="是否成功" prop="isSuccessStatusCode">
|
||||||
|
<g-sys-dict v-model="state.queryParams.isSuccessStatusCode" :code="'YesNoEnum'" render-as="select" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="请求地址" prop="requestUrl">
|
||||||
|
<el-input v-model="state.queryParams.requestUrl" placeholder="请输入请求地址" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="请求体" prop="requestBody">
|
||||||
|
<el-input v-model="state.queryParams.requestBody" placeholder="请输入请求体" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="响应状态码" prop="statusCode">
|
||||||
|
<el-input v-model="state.queryParams.statusCode" placeholder="请输入响应状态码" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="响应体" prop="responseBody">
|
||||||
|
<el-input v-model="state.queryParams.responseBody" placeholder="请输入响应体" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="异常信息" prop="exception">
|
||||||
|
<el-input v-model="state.queryParams.exception" placeholder="请输入异常信息" clearable @keyup.enter.native="handleQuery(true)" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col class="mb5" :sm="12" :md="8" :lg="6" :xl="6">
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-date-picker
|
||||||
|
type="daterange"
|
||||||
|
v-model="state.queryParams.createTimeRange"
|
||||||
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
<el-divider style="height: calc(100% - 5px); margin: 0 10px" direction="vertical" />
|
||||||
|
<el-row>
|
||||||
|
<el-col>
|
||||||
|
<el-button-group>
|
||||||
|
<el-button type="primary" icon="ele-Search" @click="handleQuery(true)" v-auth="'sysLogHttp/page'"> 查询 </el-button>
|
||||||
|
<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card class="full-table" shadow="hover" style="margin-top: 5px">
|
||||||
|
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||||
|
<template #toolbar_buttons> </template>
|
||||||
|
<template #toolbar_tools></template>
|
||||||
|
<template #empty><el-empty :image-size="200" /></template>
|
||||||
|
<template #row_record="{ row }"><ModifyRecord :data="row" /></template>
|
||||||
|
<template #row_isSuccessStatusCode="{ row, $index }">
|
||||||
|
<g-sys-dict v-model="row.isSuccessStatusCode" :code="'YesNoEnum'" />
|
||||||
|
</template>
|
||||||
|
<template #row_requestUrl="{ row, $index }">
|
||||||
|
<el-button v-if="row.requestUrl" class="ml5" icon="ele-CopyDocument" text type="primary" @click="(event: any) => handleCopyUrl(event, row.requestUrl)" />
|
||||||
|
{{ row.requestUrl.substring(0, row.requestUrl.length >= 50 ? 50 : row.requestUrl.length) }}
|
||||||
|
{{ row.requestUrl.length >= 50 ? '...' : ''}}
|
||||||
|
</template>
|
||||||
|
<template #row_requestBody="{ row, $index }">
|
||||||
|
{{ row.requestBody }}
|
||||||
|
<el-button v-if="row.requestBody" class="ml5" icon="ele-CopyDocument" text type="primary" @click="commonFun.copyText(row.requestBody?.toString())" />
|
||||||
|
</template>
|
||||||
|
<template #row_responseBody="{ row, $index }">
|
||||||
|
{{ row.responseBody }}
|
||||||
|
<el-button v-if="row.responseBody" class="ml5" icon="ele-CopyDocument" text type="primary" @click="commonFun.copyText(row.responseBody?.toString())" />
|
||||||
|
</template>
|
||||||
|
<template #row_exception="{ row, $index }">
|
||||||
|
{{ row.exception }}
|
||||||
|
<el-button v-if="row.exception" class="ml5" icon="ele-CopyDocument" text type="primary" @click="commonFun.copyText(row.exception?.toString())" />
|
||||||
|
</template>
|
||||||
|
<template #row_startTime="{ row, $index }">
|
||||||
|
{{ commonFun.dateFormatYMDHMS(row, $index, row.startTime) }}
|
||||||
|
</template>
|
||||||
|
<template #row_endTime="{ row, $index }">
|
||||||
|
{{ commonFun.dateFormatYMDHMS(row, $index, row.endTime) }}
|
||||||
|
</template>
|
||||||
|
<template #row_buttons="{ row }"> </template>
|
||||||
|
</vxe-grid>
|
||||||
|
</el-card>
|
||||||
|
<logDetail ref="logDetailRef"></logDetail>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="sysLogHttp">
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
|
import { Local } from '/@/utils/storage';
|
||||||
|
import { getAPI } from '/@/utils/axios-utils';
|
||||||
|
import { useVxeTable } from '/@/hooks/useVxeTableOptionsHook';
|
||||||
|
import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
||||||
|
import { VxeGridInstance, VxeGridListeners, VxeGridPropTypes } from 'vxe-table';
|
||||||
|
import { PageLogHttpInput, PageLogHttpOutput } from '/@/api-services/system/models';
|
||||||
|
import { SysLogHttpApi } from '/@/api-services/system/api';
|
||||||
|
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||||
|
import commonFunction from '/@/utils/commonFunction';
|
||||||
|
import logDetail from './component/logDetail.vue';
|
||||||
|
import 'vue-json-pretty/lib/styles.css';
|
||||||
|
|
||||||
|
const scEcharts = defineAsyncComponent(() => import('/@/components/scEcharts/index.vue'));
|
||||||
|
|
||||||
|
const commonFun = commonFunction();
|
||||||
|
const xGrid = ref<VxeGridInstance>();
|
||||||
|
const logDetailRef = ref<InstanceType<typeof logDetail>>();
|
||||||
|
const state = reactive({
|
||||||
|
queryParams: {} as PageLogHttpInput,
|
||||||
|
localPageParam: {
|
||||||
|
pageSize: 20 as number,
|
||||||
|
defaultSort: { field: 'id', order: 'asc', descStr: 'asc' },
|
||||||
|
},
|
||||||
|
visible: false,
|
||||||
|
logMaxValue: 1,
|
||||||
|
});
|
||||||
|
// 本地存储参数
|
||||||
|
const localPageParamKey = 'localPageParam:sysLogHttp';
|
||||||
|
// 表格参数配置
|
||||||
|
const options = useVxeTable<PageLogHttpOutput>(
|
||||||
|
{
|
||||||
|
id: 'sysLogHttp',
|
||||||
|
name: '请求日志',
|
||||||
|
columns: [
|
||||||
|
// { type: 'checkbox', width: 40, fixed: 'left' },
|
||||||
|
{ field: 'seq', type: 'seq', title: '序号', width: 60, fixed: 'left' },
|
||||||
|
{ field: 'createTime', title: '创建时间', minWidth: 150, showOverflow: 'tooltip' },
|
||||||
|
{ field: 'httpMethod', title: '请求方式', minWidth: 60, showOverflow: 'tooltip' },
|
||||||
|
{ field: 'isSuccessStatusCode', title: '是否成功', minWidth: 60, showOverflow: 'tooltip', slots: { default: 'row_isSuccessStatusCode' } },
|
||||||
|
{ field: 'requestUrl', title: '请求地址', minWidth: 150, align: 'left', showOverflow: 'tooltip', slots: { default: 'row_requestUrl' } },
|
||||||
|
{ field: 'requestHeaders', title: '请求头', minWidth: 150, showOverflow: 'tooltip' },
|
||||||
|
{ field: 'requestBody', title: '请求体', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_requestBody' } },
|
||||||
|
{ field: 'statusCode', title: '响应状态码', minWidth: 70, showOverflow: 'tooltip' },
|
||||||
|
{ field: 'responseHeaders', title: '响应头', minWidth: 150, showOverflow: 'tooltip' },
|
||||||
|
{ field: 'responseBody', title: '响应体', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_responseBody' } },
|
||||||
|
{ field: 'exception', title: '异常信息', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_exception' } },
|
||||||
|
{ field: 'startTime', title: '开始时间', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_startTime' } },
|
||||||
|
{ field: 'endTime', title: '结束时间', minWidth: 150, showOverflow: 'tooltip', slots: { default: 'row_endTime' } },
|
||||||
|
{ field: 'elapsed', title: '耗时(毫秒)', minWidth: 90, showOverflow: 'tooltip' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
// vxeGrid配置参数(此处可覆写任何参数),参考vxe-table官方文档
|
||||||
|
{
|
||||||
|
// 代理配置
|
||||||
|
proxyConfig: { autoLoad: true, ajax: { query: ({ page }) => handleQueryApi(page) } },
|
||||||
|
// 排序配置
|
||||||
|
sortConfig: { defaultSort: Local.get(localPageParamKey)?.defaultSort || state.localPageParam.defaultSort },
|
||||||
|
// 分页配置
|
||||||
|
pagerConfig: { pageSize: Local.get(localPageParamKey)?.pageSize || state.localPageParam.pageSize },
|
||||||
|
// 导入配置
|
||||||
|
// importConfig: { remote: true, importMethod: (options: any) => handleImport(options), slots: { top: 'import_sysLogHttp' } },
|
||||||
|
// 工具栏配置
|
||||||
|
toolbarConfig: { import: false, export: true },
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// 页面初始化
|
||||||
|
onMounted(async () => {
|
||||||
|
state.localPageParam = Local.get(localPageParamKey) || state.localPageParam;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询api
|
||||||
|
const handleQueryApi = async (page: VxeGridPropTypes.ProxyAjaxQueryPageParams) => {
|
||||||
|
await getYearDayStatsData();
|
||||||
|
const params = Object.assign(state.queryParams, {
|
||||||
|
page: page.currentPage,
|
||||||
|
pageSize: page.pageSize,
|
||||||
|
field: state.localPageParam.defaultSort.field,
|
||||||
|
order: state.localPageParam.defaultSort.order,
|
||||||
|
descStr: 'asc',
|
||||||
|
}) as PageLogHttpInput;
|
||||||
|
return getAPI(SysLogHttpApi).apiSysLogHttpPagePost(params);
|
||||||
|
};
|
||||||
|
|
||||||
|
// 查询操作
|
||||||
|
const handleQuery = async (reset = false) => {
|
||||||
|
options.loading = true;
|
||||||
|
reset ? await xGrid.value?.commitProxy('reload') : await xGrid.value?.commitProxy('query');
|
||||||
|
options.loading = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 复制请求地址操作
|
||||||
|
const handleCopyUrl = (event: PointerEvent, url: string) => {
|
||||||
|
event.stopPropagation(); // 阻止事件冒泡
|
||||||
|
commonFun.copyText(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重置操作
|
||||||
|
const resetQuery = async () => {
|
||||||
|
state.queryParams.httpMethod = undefined;
|
||||||
|
state.queryParams.isSuccessStatusCode = undefined;
|
||||||
|
state.queryParams.requestUrl = undefined;
|
||||||
|
state.queryParams.requestBody = undefined;
|
||||||
|
state.queryParams.statusCode = undefined;
|
||||||
|
state.queryParams.responseBody = undefined;
|
||||||
|
state.queryParams.exception = undefined;
|
||||||
|
state.queryParams.createTime = undefined;
|
||||||
|
await xGrid.value?.commitProxy('reload');
|
||||||
|
};
|
||||||
|
|
||||||
|
// 获取主题颜色变量
|
||||||
|
const colors = ['--el-color-primary-light-9', '--el-color-primary-light-7', '--el-color-primary-light-5', '--el-color-primary-light-3', '--el-color-primary-light-1', '--el-color-primary'].map(
|
||||||
|
(variable) => getComputedStyle(document.documentElement).getPropertyValue(variable).trim()
|
||||||
|
);
|
||||||
|
const echartsOption = ref({
|
||||||
|
title: {
|
||||||
|
top: 30,
|
||||||
|
left: 'center',
|
||||||
|
text: '日志统计',
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
tooltip: {
|
||||||
|
formatter: function (p: any) {
|
||||||
|
return p.data[1] + ' 数据量:' + p.data[0];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
visualMap: {
|
||||||
|
show: true,
|
||||||
|
inRange: {
|
||||||
|
color: colors,
|
||||||
|
},
|
||||||
|
outOfRange: {
|
||||||
|
color: ['#000000'],
|
||||||
|
},
|
||||||
|
min: 0,
|
||||||
|
max: 1000,
|
||||||
|
maxOpen: {
|
||||||
|
type: 'piecewise',
|
||||||
|
},
|
||||||
|
type: 'piecewise',
|
||||||
|
orient: 'horizontal',
|
||||||
|
left: 'right',
|
||||||
|
},
|
||||||
|
calendar: {
|
||||||
|
top: 30,
|
||||||
|
left: 30,
|
||||||
|
right: 30,
|
||||||
|
bottom: 30,
|
||||||
|
cellSize: ['auto', 20],
|
||||||
|
range: ['', ''],
|
||||||
|
splitLine: true,
|
||||||
|
dayLabel: {
|
||||||
|
firstDay: 1,
|
||||||
|
nameMap: 'ZH',
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
color: '#ccc',
|
||||||
|
borderWidth: 3,
|
||||||
|
borderColor: '#fff',
|
||||||
|
},
|
||||||
|
monthLabel: {
|
||||||
|
nameMap: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||||
|
},
|
||||||
|
yearLabel: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: {
|
||||||
|
type: 'heatmap',
|
||||||
|
coordinateSystem: 'calendar',
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const clickData = (e: any) => {
|
||||||
|
if (e[1] < 1) return ElMessage.warning('没有日志数据');
|
||||||
|
state.queryParams.createTimeRange = [];
|
||||||
|
state.queryParams.createTimeRange.push(e[0]);
|
||||||
|
var today = new Date(e[0]);
|
||||||
|
let endTime = today.setDate(today.getDate() + 1);
|
||||||
|
state.queryParams.createTimeRange.push(new Date(endTime));
|
||||||
|
xGrid.value?.commitProxy('query');
|
||||||
|
};
|
||||||
|
// 获取统计日志数据
|
||||||
|
const getYearDayStatsData = async () => {
|
||||||
|
let data = [] as any;
|
||||||
|
var res = await getAPI(SysLogHttpApi).apiSysLogHttpYearDayStatsGet();
|
||||||
|
res.data.result?.forEach((item: any) => {
|
||||||
|
data.push([item.date, item.count]);
|
||||||
|
|
||||||
|
if (item.count > state.logMaxValue) state.logMaxValue = item.count; // 计算最大值
|
||||||
|
});
|
||||||
|
echartsOption.value.visualMap.max = state.logMaxValue;
|
||||||
|
echartsOption.value.series.data = data;
|
||||||
|
echartsOption.value.calendar.range = [data[0][0], data[data.length - 1][0]];
|
||||||
|
};
|
||||||
|
|
||||||
|
// 表格事件
|
||||||
|
const gridEvents: VxeGridListeners<PageLogHttpOutput> = {
|
||||||
|
// 只对 pager-config 配置时有效,分页发生改变时会触发该事件
|
||||||
|
async pageChange({ pageSize }) {
|
||||||
|
state.localPageParam.pageSize = pageSize;
|
||||||
|
Local.set(localPageParamKey, state.localPageParam);
|
||||||
|
},
|
||||||
|
// 当排序条件发生变化时会触发该事件
|
||||||
|
async sortChange({ field, order }) {
|
||||||
|
state.localPageParam.defaultSort = { field: field, order: order!, descStr: 'desc' };
|
||||||
|
Local.set(localPageParamKey, state.localPageParam);
|
||||||
|
},
|
||||||
|
cellClick({ row, column }) {
|
||||||
|
if (['请求地址', '请求头', '请求体', '响应头', '响应体', '异常信息'].includes(column.title)) {
|
||||||
|
logDetailRef.value?.openDialog(row);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped></style>
|
||||||
Loading…
Reference in New Issue
Block a user