Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
7899f85d
Commit
7899f85d
authored
Jul 12, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
33cceddf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
XxLogInterceptor.java
.../github/wxiaoqi/security/common/log/XxLogInterceptor.java
+6
-7
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/log/XxLogInterceptor.java
View file @
7899f85d
package
com
.
github
.
wxiaoqi
.
security
.
common
.
log
;
package
com
.
github
.
wxiaoqi
.
security
.
common
.
log
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.log.CommonLogService
;
import
com.github.wxiaoqi.security.common.log.CommonLogService
;
import
com.github.wxiaoqi.security.common.log.entity.XxLogEntity
;
import
com.github.wxiaoqi.security.common.log.entity.XxLogEntity
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
...
@@ -54,20 +55,18 @@ public class XxLogInterceptor{
...
@@ -54,20 +55,18 @@ public class XxLogInterceptor{
result
=
pjp
.
proceed
();
//执行方法,获取返回参数
result
=
pjp
.
proceed
();
//执行方法,获取返回参数
//###################下面代码为方法执行后#####################
//###################下面代码为方法执行后#####################
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
(
BaseResponse
)
result
);
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
(
BaseResponse
)
result
);
}
catch
(
BaseException
e
){
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
ObjectRestResponse
.
createFailedResult
(
e
.
getStatus
(),
e
.
getMessage
()));
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
(
BaseResponse
)
result
);
commonLogService
.
initCommonLogLastPart
(
xxLogEntity
,
ObjectRestResponse
.
createFailedResult
(
500
,
e
.
getMessage
()));
xxLogEntity
.
setResponseData
(
JSON
.
toJSONString
(
ObjectRestResponse
.
createDefaultFail
()));
throw
e
;
throw
e
;
}
finally
{
}
finally
{
commonLogService
.
commonLog
(
xxLogEntity
);
commonLogService
.
commonLog
(
xxLogEntity
);
}
}
if
(
result
instanceof
BaseResponse
)
{
return
(
BaseResponse
)
result
;
}
else
{
return
result
;
return
result
;
}
}
}
// @Around("within(com.github.wxiaoqi.security.security.gate.filter..*)")
// @Around("within(com.github.wxiaoqi.security.security.gate.filter..*)")
// public Object doAroundXxControllerLog(ProceedingJoinPoint pjp) throws Throwable {
// public Object doAroundXxControllerLog(ProceedingJoinPoint pjp) throws Throwable {
...
...
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