Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
10de725a
Commit
10de725a
authored
Aug 26, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8c4f2475
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
80 deletions
+11
-80
ResponseHandler.cs
Mall.Common/Pay/WeChatPat/ResponseHandler.cs
+1
-2
CommonHelper.cs
Mall.Common/Plugin/CommonHelper.cs
+0
-46
LogHelper.cs
Mall.Common/Plugin/LogHelper.cs
+1
-23
OytourOssService.cs
Mall.ThirdCore/Oss/OytourOssService.cs
+4
-4
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+3
-3
ApiExceptionFilterAttribute.cs
Mall.WebApi/Filter/ApiExceptionFilterAttribute.cs
+2
-2
No files found.
Mall.Common/Pay/WeChatPat/ResponseHandler.cs
View file @
10de725a
...
...
@@ -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"
);
}
...
...
Mall.Common/Plugin/CommonHelper.cs
View file @
10de725a
...
...
@@ -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>
...
...
Mall.Common/Plugin/LogHelper.cs
View file @
10de725a
...
...
@@ -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>
/// 写日志
...
...
Mall.ThirdCore/Oss/OytourOssService.cs
View file @
10de725a
...
...
@@ -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
;
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
10de725a
...
...
@@ -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
();
...
...
Mall.WebApi/Filter/ApiExceptionFilterAttribute.cs
View file @
10de725a
...
...
@@ -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
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment