From 695571c6009ecbc12e7d4a4fb147df7967a1260e Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 07 七月 2025 20:21:19 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/MeiRuiAn/HuaiAn
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs"
index 420633f..f86165d 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs"
@@ -10,13 +10,14 @@
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
using WIDESEA_Core.Helper;
using WIDESEA_Core.LogHelper;
namespace WIDESEA_Core.AOP
{
/// <summary>
- /// 鎷︽埅鍣˙logLogAOP 缁ф壙IInterceptor鎺ュ彛
+ /// 鎷︽埅鍣↙ogAOP 缁ф壙IInterceptor鎺ュ彛
/// </summary>
public class LogAOP : IInterceptor
{
@@ -66,9 +67,17 @@
try
{
MiniProfiler.Current.Step($"鎵ц{invocation.InvocationTarget}.{invocation.Method.Name}()鏂规硶 -> ");
+
+ //MethodParamsValidateAttribute? paramsValidateAttribute = invocation.Method.GetCustomAttribute<MethodParamsValidateAttribute>();
+ //if (paramsValidateAttribute != null)
+ //{
+ // foreach (var item in invocation.Arguments)
+ // {
+
+ // }
+ //}
//鍦ㄨ鎷︽埅鐨勬柟娉曟墽琛屽畬姣曞悗 缁х画鎵ц褰撳墠鏂规硶锛屾敞鎰忔槸琚嫤鎴殑鏄紓姝ョ殑
invocation.Proceed();
-
// 寮傛鑾峰彇寮傚父锛屽厛鎵ц
if (IsAsyncMethod(invocation.Method))
{
@@ -146,7 +155,7 @@
apiLogAopInfo.ResponseJsonData = jsonResult;
Parallel.For(0, 1, e =>
{
- LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
+ LogLock.OutLogAOP("鍏ㄥ眬鏃ュ織AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
});
}
}
@@ -170,7 +179,7 @@
Parallel.For(0, 1, e =>
{
//LogLock.OutSql2Log("AOPLog", new string[] { JsonConvert.SerializeObject(apiLogAopInfo) });
- LogLock.OutLogAOP("AOPLog", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
+ LogLock.OutLogAOP("鍏ㄥ眬鏃ュ織AOP", new string[] { apiLogAopInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopInfo) });
});
});
}
@@ -192,7 +201,7 @@
// 寮傚父鏃ュ織閲屾湁璇︾粏鐨勫爢鏍堜俊鎭�
Parallel.For(0, 1, e =>
{
- LogLock.OutLogAOP("AOPLogEx", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) });
+ LogLock.OutLogAOP("鍏ㄥ眬寮傚父閿欒鏃ュ織AOP", new string[] { apiLogAopExInfo.GetType().ToString(), JsonConvert.SerializeObject(apiLogAopExInfo) });
});
}
}
--
Gitblit v1.9.3