From 46e98339480d853fc78a014c34d7ff9fcaf13890 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期四, 05 十二月 2024 14:09:02 +0800 Subject: [PATCH] 产线协议 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs" index 6f29980..50c3754 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_Core/AOP/LogAOP.cs" @@ -27,9 +27,8 @@ _accessor = accessor; } - /// <summary> - /// 瀹炰緥鍖朓Interceptor鍞竴鏂规硶 + /// 瀹炰緥鍖朓Interceptor鍞竴鏂规硶 /// </summary> /// <param name="invocation">鍖呭惈琚嫤鎴柟娉曠殑淇℃伅</param> public void Intercept(IInvocation invocation) @@ -38,7 +37,7 @@ string json; try { - if(invocation.Arguments.Any()) + if (invocation.Arguments.Any()) { json = JsonConvert.SerializeObject(invocation.Arguments); } @@ -100,8 +99,7 @@ }); } - #endregion - + #endregion 鏂规涓� // 濡傛灉鏂规涓�涓嶈锛岃瘯璇曡繖涓柟妗� //#region 鏂规浜� @@ -157,7 +155,6 @@ LogEx(ex, apiLogAopInfo); throw; } - } private async Task SuccessAction(IInvocation invocation, AOPLogInfo apiLogAopInfo, DateTime startTime, object o = null) @@ -167,7 +164,6 @@ apiLogAopInfo.ResponseTime = endTime.ToString("yyyy-MM-dd hh:mm:ss fff"); apiLogAopInfo.ResponseIntervalTime = ResponseTime + "ms"; apiLogAopInfo.ResponseJsonData = JsonConvert.SerializeObject(o); - await Task.Run(() => { @@ -201,7 +197,6 @@ } } - public static bool IsAsyncMethod(MethodInfo method) { return @@ -210,7 +205,6 @@ ; } } - internal static class InternalAsyncHelper { @@ -271,36 +265,43 @@ /// </summary> [Description("璇锋眰鏃堕棿")] public string RequestTime { get; set; } = string.Empty; + /// <summary> /// 鎿嶄綔浜哄憳 /// </summary> [Description("鎿嶄綔浜哄憳")] public string OpUserName { get; set; } = string.Empty; + /// <summary> /// 璇锋眰鏂规硶鍚� /// </summary> [Description("璇锋眰鏂规硶鍚�")] public string RequestMethodName { get; set; } = string.Empty; + /// <summary> /// 璇锋眰鍙傛暟鍚� /// </summary> [Description("璇锋眰鍙傛暟鍚�")] public string RequestParamsName { get; set; } = string.Empty; + /// <summary> /// 璇锋眰鍙傛暟鏁版嵁JSON /// </summary> - [Description("璇锋眰鍙傛暟鏁版嵁JSON")] + [Description("璇锋眰鍙傛暟鏁版嵁JSON")] public string RequestParamsData { get; set; } = string.Empty; + /// <summary> /// 璇锋眰鍝嶅簲闂撮殧鏃堕棿 /// </summary> [Description("璇锋眰鍝嶅簲闂撮殧鏃堕棿")] public string ResponseIntervalTime { get; set; } = string.Empty; + /// <summary> /// 鍝嶅簲鏃堕棿 /// </summary> [Description("鍝嶅簲鏃堕棿")] public string ResponseTime { get; set; } = string.Empty; + /// <summary> /// 鍝嶅簲缁撴灉 /// </summary> @@ -311,15 +312,17 @@ public class AOPLogExInfo { public AOPLogInfo ApiLogAopInfo { get; set; } + /// <summary> /// 寮傚父 /// </summary> [Description("寮傚父")] public string InnerException { get; set; } = string.Empty; + /// <summary> /// 寮傚父淇℃伅 /// </summary> [Description("寮傚父淇℃伅")] public string ExMessage { get; set; } = string.Empty; } -} +} \ No newline at end of file -- Gitblit v1.9.3