TrialResourceFilter

Uat_Study
{872297557@qq.com} 2023-01-06 14:20:43 +08:00
parent ce4ca4b382
commit 8838871c0d
2 changed files with 12 additions and 4 deletions

View File

@ -411,7 +411,8 @@ namespace IRaCIS.Core.API.Controllers
/// <param name="opt"></param>
/// <returns></returns>
[HttpPost, Route("Inspection/TrialConfig/updateTrialState")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "BeforeOngoingCantOpt" })]
[UnitOfWork]
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialStateDto> opt)
{

View File

@ -18,7 +18,7 @@ namespace IRaCIS.Core.Application.Filter
private readonly string _trialOpt;
//private readonly List<string> _trialOptList;
public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo, string trialOpt)
@ -29,6 +29,13 @@ namespace IRaCIS.Core.Application.Filter
}
//public TrialResourceFilter(IEasyCachingProvider provider, IUserInfo userInfo, List<string> trialOptList=new list)
//{
// _provider = provider;
// _userInfo = userInfo;
// _trialOptList = trialOptList;
//}
//优先选择异步的方法
public async Task OnResourceExecutionAsync(ResourceExecutingContext context, ResourceExecutionDelegate next)