修改接口重复验证
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
be034d4d8b
commit
d96e746db7
|
|
@ -50,30 +50,33 @@ namespace IRaCIS.Core.Application.BusinessFilter.LegacyController
|
||||||
/// <returns>返回的对象</returns>
|
/// <returns>返回的对象</returns>
|
||||||
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
|
public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
|
||||||
{
|
{
|
||||||
Dictionary<string, object?> dic = new Dictionary<string, object?>();
|
if (RequestDuplicationOptionsMonitor.CurrentValue.IsEnabled)
|
||||||
var desc = context.ActionDescriptor as ControllerActionDescriptor;
|
|
||||||
foreach (var p in desc.Parameters)
|
|
||||||
{
|
{
|
||||||
// 关键判断:绑定源是否是 Services
|
Dictionary<string, object?> dic = new Dictionary<string, object?>();
|
||||||
if (p.BindingInfo?.BindingSource == BindingSource.Services) continue;
|
var desc = context.ActionDescriptor as ControllerActionDescriptor;
|
||||||
// 普通参数,取值
|
foreach (var p in desc.Parameters)
|
||||||
if (context.ActionArguments.TryGetValue(p.Name, out var value) && value != null)
|
|
||||||
{
|
{
|
||||||
dic.Add(p.Name, value);
|
// 关键判断:绑定源是否是 Services
|
||||||
|
if (p.BindingInfo?.BindingSource == BindingSource.Services) continue;
|
||||||
|
// 普通参数,取值
|
||||||
|
if (context.ActionArguments.TryGetValue(p.Name, out var value) && value != null)
|
||||||
|
{
|
||||||
|
dic.Add(p.Name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.Intoparam = JsonConvert.SerializeObject(dic);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
this.RequestDuplication();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Intoparam = JsonConvert.SerializeObject(dic);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.RequestDuplication();
|
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var resultContext = await next();
|
var resultContext = await next();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue