From b690250002ee04f4309e6a90fd16fbfd9bd959e2 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 01 五月 2026 23:11:23 +0800
Subject: [PATCH] feat(router): 添加托盘操作页面路由
---
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
index 86728ff..8426635 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Middlewares/ApiLogMiddleware.cs
@@ -14,6 +14,18 @@
public class ApiLogMiddleware
{
/// <summary>
+ /// 涓嶅啓鍏� Sys_Log 琛ㄧ殑鎺ュ彛璺緞锛堝彧鍐欐枃浠舵棩蹇楋級
+ /// </summary>
+ private static readonly string[] _apiLogSkipPaths =
+ {
+ "InOrOutCompleted",
+ "SendLocationStatus",
+ "RequestOutbound",
+ "GetPalletCodeCell",
+ "GetOutBoundTrayTask"
+ };
+
+ /// <summary>
///
/// </summary>
private readonly RequestDelegate _next;
@@ -21,6 +33,15 @@
public ApiLogMiddleware(RequestDelegate next, ILogger<ApiLogMiddleware> logger)
{
_next = next;
+ }
+
+ /// <summary>
+ /// 鍒ゆ柇褰撳墠璇锋眰璺緞鏄惁鍦ㄨ烦杩囨暟鎹簱鏃ュ織鍒楄〃涓�
+ /// </summary>
+ private static bool IsApiLogSkipPath(string? path)
+ {
+ if (string.IsNullOrEmpty(path)) return false;
+ return _apiLogSkipPaths.Any(skip => path.Contains(skip));
}
//todo
@@ -87,7 +108,8 @@
ms.Position = 0;
await ms.CopyToAsync(originalBody);
- if (!ignoreUrls.Any(x => context.Request.Path.Value?.Contains(x) ?? false))
+ if (!ignoreUrls.Any(x => context.Request.Path.Value?.Contains(x) ?? false)
+ && !IsApiLogSkipPath(context.Request.Path.Value))
{
Logger.Add(requestParam, responseParam);
}
--
Gitblit v1.9.3