dbug

parent 64f5370e
...@@ -39,8 +39,6 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron ...@@ -39,8 +39,6 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
var kv = GetRequestContent(request); var kv = GetRequestContent(request);
_logger.LogInformation($"请求内容 {request.Method}:{JsonHelper.Serialize(kv)}"); _logger.LogInformation($"请求内容 {request.Method}:{JsonHelper.Serialize(kv)}");
//token验证 //token验证
if (!_env.IsDevelopment())
{
var arry = ((ControllerActionDescriptor)context.ActionDescriptor).MethodInfo.GetCustomAttributes(typeof(NoVerifyAttribute), true); var arry = ((ControllerActionDescriptor)context.ActionDescriptor).MethodInfo.GetCustomAttributes(typeof(NoVerifyAttribute), true);
if (arry.Length == 0) if (arry.Length == 0)
{ {
...@@ -52,16 +50,14 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron ...@@ -52,16 +50,14 @@ public ActionsFilter(ILoggerFactory factory, IMemoryCache cache, IHostingEnviron
context.Result = new ObjectResult(response); context.Result = new ObjectResult(response);
return; return;
} }
var activeuid = kv.GetValue<Nullable<int>>("activeuid"); //var activeuid = kv.GetValue<Nullable<int>>("activeuid");
if (!activeuid.HasValue) //if (!activeuid.HasValue)
{ //{
var response = new ApiResponse(ResponseType.TokenError, "Token无效"); // var response = new ApiResponse(ResponseType.TokenError, "Token无效");
context.Result = new ObjectResult(response); // context.Result = new ObjectResult(response);
return; // return;
} //}
} }
}
//验证请求参数 //验证请求参数
if (!context.ModelState.IsValid) if (!context.ModelState.IsValid)
{ {
......
...@@ -34,5 +34,7 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options) ...@@ -34,5 +34,7 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public virtual DbSet<res_compute> Res_Compute { get; set; } public virtual DbSet<res_compute> Res_Compute { get; set; }
public virtual DbSet<cof_position> Cof_Position { get; set; } public virtual DbSet<cof_position> Cof_Position { get; set; }
public virtual DbSet<cof_workyear> Cof_Workyear { get; set; } public virtual DbSet<cof_workyear> Cof_Workyear { get; set; }
public virtual DbSet<im_specialunit> Im_SpecialUnit { get; set; }
public virtual DbSet<res_specialunit> Res_SpecialUnit { get; set; }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment