Commit 10de725a authored by 黄奎's avatar 黄奎

页面修改

parent 8c4f2475
......@@ -77,9 +77,8 @@ namespace Mall.Common.Pay.WeChatPat
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "ResponseHandler");
//若签名错误,则立即返回结果给微信支付后台
Plugin.LogHelper.Error($"ResponseHandler xml错误",ex);
Common.Plugin.LogHelper.Write(ex, "ResponseHandler");
}
Plugin.LogHelper.WriteInfo($"GetNotifyData Check sign success");
}
......
......@@ -32,52 +32,6 @@ namespace Mall.Common.Plugin
return resultFileList;
}
/// <summary>
/// 取得用户客户端IP(穿过代理服务器取远程用户真实IP地址)
/// </summary>
//public static string GetClientIP()
//{
// try
// {
// if (HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null)
// {
// return HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString();
// }
// else
// {
// return HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();
// }
// }
// catch
// {
// return "0.0.0.0";
// }
//}
/// <summary>
/// 获取当前域名
/// </summary>
/// <returns></returns>
//public static string GetDomain()
//{
// try
// {
// string Domain = HttpContext.Current.Request.Url.Host;
// if (Domain == null || string.IsNullOrEmpty(Domain))
// {
// return "";
// }
// else
// {
// return Domain;
// }
// }
// catch
// {
// return "";
// }
//}
/// <summary>
/// 根据出生日期判断人的类型
/// </summary>
......
......@@ -30,17 +30,7 @@ namespace Mall.Common.Plugin
Directory.CreateDirectory(requestLogDir);
}
/// <summary>
/// 错误日志
/// </summary>
/// <param name="msg">信息</param>
/// <param name="exception">异常内容</param>
public static void Error(string msg, Exception exception)
{
Write(exception, msg);
}
/// <summary>
/// 写日志(异常日志)
/// </summary>
......@@ -78,18 +68,6 @@ namespace Mall.Common.Plugin
Task.Run(() => WriteLog(null, msg, LogEnum.Info));
}
/// <summary>
/// 接口请求信息(记录信息)
/// </summary>
/// <param name="msg">信息</param>
public static void RequestInfo(string msg)
{
string isOpenRequestLog = ConfigurationManager.AppSettings["OpenRequestLog"].ToString();
if ("true".Equals(isOpenRequestLog))
{
Task.Run(() => WriteLog(null, msg, LogEnum.Request));
}
}
/// <summary>
/// 写日志
......
......@@ -51,7 +51,7 @@ namespace Mall.ThirdCore.Oss
catch (Exception ex)
{
ossResult.resultCode = 0;
Mall.Common.Plugin.LogHelper.Error("OytourOssService_UploadFile文件上传保存失败", ex);
Mall.Common.Plugin.LogHelper.Write(ex,"OytourOssService_UploadFile文件上传保存失败");
}
return ossResult;
}
......@@ -86,7 +86,7 @@ namespace Mall.ThirdCore.Oss
}
catch (Exception e)
{
Mall.Common.Plugin.LogHelper.Error("OytourOssService_DeleteFile" + e.ToString(), e);
Mall.Common.Plugin.LogHelper.Write(e, "OytourOssService_DeleteFile" + e.ToString());
ossResult.resultCode = 0;
ossResult.message = e.ToString();
return ossResult;
......@@ -110,7 +110,7 @@ namespace Mall.ThirdCore.Oss
}
catch (Exception e)
{
Mall.Common.Plugin.LogHelper.Error("OytourOssService_DeleteFileList" + e.ToString(), e);
Mall.Common.Plugin.LogHelper.Write(e, "OytourOssService_DeleteFileList" + e.ToString());
ossResult.resultCode = 0;
ossResult.message = e.ToString();
return ossResult;
......@@ -134,7 +134,7 @@ namespace Mall.ThirdCore.Oss
}
catch (Exception e)
{
Mall.Common.Plugin.LogHelper.Error("OytourOssService_FileCopy" + e.ToString(), e);
Mall.Common.Plugin.LogHelper.Write(e, "OytourOssService_FileCopy" + e.ToString());
ossResult.resultCode = 0;
ossResult.message = e.ToString();
return ossResult;
......
......@@ -91,7 +91,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Error("MallController_GetHome", ex);
Common.Plugin.LogHelper.Write(ex,"MallController_GetHome");
}
int page_id = parms.GetInt("page_id");
......@@ -434,7 +434,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Error("MallController_GetUserCenter", ex);
Common.Plugin.LogHelper.Write(ex, "MallController_GetUserCenter");
}
//获取小程序信息
var miniProgram = programModule.GetMiniProgramModule(new Model.Extend.User.RB_MiniProgram_Extend() { MiniAppId = MiniAppId }, isGetUserCenterMenu: true);
......@@ -636,7 +636,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Error("GetGoosPoster", ex);
Common.Plugin.LogHelper.Write(ex, "GetGoosPoster");
}
//获取小程序信息
var miniProgram = new RB_MiniProgram_Extend();
......
......@@ -34,12 +34,12 @@ namespace Mall.WebApi.Filter
//记录错误日志
if (context.HttpContext.Items[GlobalKey.UserPostInfo] != null)
{
LogHelper.Error($"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())},请求参数:{JsonConvert.SerializeObject(context.HttpContext.Items[GlobalKey.UserPostInfo].ToString())}", context.Exception);
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())},请求参数:{JsonConvert.SerializeObject(context.HttpContext.Items[GlobalKey.UserPostInfo].ToString())}");
Console.WriteLine(context.Exception);
}
else
{
LogHelper.Error($"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())}", context.Exception);
LogHelper.Write(context.Exception,$"ApiExceptionFilterAttribute_InvokeServiceMethod请求地址:{Config.GetFilePath(context.HttpContext.Request.GetAbsoluteUri())}");
Console.WriteLine(context.Exception);
}
......
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