Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
fda01825
Commit
fda01825
authored
Jul 05, 2021
by
李学兴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opt@20210702-日志规范-lxx:#日志规范 合入 兆良日志代码
parent
651722bd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
17 deletions
+12
-17
order-application-service/src/main/java/cn/freemud/aop/LogIgnoreAspect.java
+3
-4
order-application-service/src/main/java/cn/freemud/aop/LogIgnoreFeignAspect.java
+5
-5
order-application-service/src/main/java/cn/freemud/service/coupon/impl/PlatformCouponRelationServiceImpl.java
+0
-3
order-application-service/src/main/java/cn/freemud/service/impl/EvaluationServiceImpl.java
+4
-5
No files found.
order-application-service/src/main/java/cn/freemud/aop/LogIgnoreAspect.java
View file @
fda01825
package
cn
.
freemud
.
aop
;
package
cn
.
freemud
.
aop
;
import
cn.freemud.annotations.LogIgnore
;
import
cn.freemud.annotations.LogIgnore
;
import
cn.freemud.utils.AppLogUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.exception.IgnoreErrorAnnotation
;
import
com.freemud.application.sdk.api.exception.IgnoreErrorAnnotation
;
...
@@ -75,9 +76,7 @@ public class LogIgnoreAspect implements Ordered {
...
@@ -75,9 +76,7 @@ public class LogIgnoreAspect implements Ordered {
Object
target
=
joinPoint
.
getTarget
();
Object
target
=
joinPoint
.
getTarget
();
Method
currentMethod
=
target
.
getClass
().
getMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
Method
currentMethod
=
target
.
getClass
().
getMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
if
(
ApiLog
.
isDebugEnabled
())
{
AppLogUtil
.
debugLotsParams
(
"获取tracking的值====>{}"
,
new
Object
[]{
request
.
getHeader
(
"x-transaction-id"
)});
ApiLog
.
debug
(
"获取tracking的值====>{}"
,
new
Object
[]{
request
.
getHeader
(
"x-transaction-id"
)});
}
LogThreadLocal
.
setTrackingNo
(
StringUtils
.
isEmpty
(
request
.
getHeader
(
"x-transaction-id"
))
?
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
)
:
request
.
getHeader
(
"x-transaction-id"
));
LogThreadLocal
.
setTrackingNo
(
StringUtils
.
isEmpty
(
request
.
getHeader
(
"x-transaction-id"
))
?
UUID
.
randomUUID
().
toString
().
replaceAll
(
"-"
,
""
)
:
request
.
getHeader
(
"x-transaction-id"
));
List
logArgs
=
this
.
getLogArgs
(
currentMethod
,
joinPoint
);
List
logArgs
=
this
.
getLogArgs
(
currentMethod
,
joinPoint
);
String
requestData
=
JSON
.
toJSONString
(
logArgs
);
String
requestData
=
JSON
.
toJSONString
(
logArgs
);
...
@@ -98,7 +97,7 @@ public class LogIgnoreAspect implements Ordered {
...
@@ -98,7 +97,7 @@ public class LogIgnoreAspect implements Ordered {
}
}
}
}
}
}
ApiLog
.
infoConvertJson
(
logMethod
.
toString
(),
logIgnore
.
logMessage
(),
request
,
startTime
,
System
.
currentTimeMillis
(),
requestData
,
logObj
);
ApiLog
.
infoConvertJson
(
logMethod
.
toString
(),
logIgnore
.
logMessage
(),
request
,
startTime
,
System
.
currentTimeMillis
(),
requestData
,
logObj
,
null
,
null
);
LogThreadLocal
.
removeTrackingNo
();
LogThreadLocal
.
removeTrackingNo
();
return
object
;
return
object
;
}
}
...
...
order-application-service/src/main/java/cn/freemud/aop/LogIgnoreFeignAspect.java
View file @
fda01825
...
@@ -3,7 +3,7 @@ package cn.freemud.aop;
...
@@ -3,7 +3,7 @@ package cn.freemud.aop;
import
cn.freemud.annotations.LogIgnore
;
import
cn.freemud.annotations.LogIgnore
;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.entities.vo.ThirdPartLogVo
;
import
cn.freemud.entities.vo.ThirdPartLogVo
;
import
cn.freemud.utils.LogUtil
;
import
cn.freemud.utils.
App
LogUtil
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.base.SDKCommonBaseContextWare
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.log.LogThreadLocal
;
import
com.freemud.application.sdk.api.log.ThirdPartyLog
;
import
com.freemud.application.sdk.api.log.ThirdPartyLog
;
...
@@ -49,8 +49,8 @@ public class LogIgnoreFeignAspect {
...
@@ -49,8 +49,8 @@ public class LogIgnoreFeignAspect {
try
{
try
{
result
=
joinPoint
.
proceed
();
result
=
joinPoint
.
proceed
();
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ThirdPartLogVo
thirdPartLogVo
=
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
ThirdPartLogVo
thirdPartLogVo
=
App
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
LogUtil
.
thirdPartError
(
start
,
System
.
currentTimeMillis
(),
thirdPartLogVo
,
null
);
App
LogUtil
.
thirdPartError
(
start
,
System
.
currentTimeMillis
(),
thirdPartLogVo
,
null
);
throw
ex
;
throw
ex
;
}
}
try
{
try
{
...
@@ -60,7 +60,7 @@ public class LogIgnoreFeignAspect {
...
@@ -60,7 +60,7 @@ public class LogIgnoreFeignAspect {
msig
=
(
MethodSignature
)
sig
;
msig
=
(
MethodSignature
)
sig
;
Method
currentMethod
=
sig
.
getDeclaringType
().
getDeclaredMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
Method
currentMethod
=
sig
.
getDeclaringType
().
getDeclaredMethod
(
msig
.
getName
(),
msig
.
getParameterTypes
());
Object
logReult
=
result
;
Object
logReult
=
result
;
ThirdPartLogVo
thirdPartLogVo
=
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
ThirdPartLogVo
thirdPartLogVo
=
App
LogUtil
.
createThirdPartLogVo
(
joinPoint
);
// 打印第三方出参日志
// 打印第三方出参日志
if
(!
this
.
printFeignResponseBodyLog
)
{
if
(!
this
.
printFeignResponseBodyLog
)
{
LogIgnoreFeign
logIgnore
=
currentMethod
.
getAnnotation
(
LogIgnoreFeign
.
class
);
LogIgnoreFeign
logIgnore
=
currentMethod
.
getAnnotation
(
LogIgnoreFeign
.
class
);
...
@@ -80,7 +80,7 @@ public class LogIgnoreFeignAspect {
...
@@ -80,7 +80,7 @@ public class LogIgnoreFeignAspect {
thirdPartLogVo
.
getUri
(),
thirdPartLogVo
.
getRequestBody
(),
logReult
);
thirdPartLogVo
.
getUri
(),
thirdPartLogVo
.
getRequestBody
(),
logReult
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
"WebAspect Feign Log Ignore error {}"
,
""
,
""
,
e
);
AppLogUtil
.
errorLog
(
"WebAspect Feign Log Ignore error {}"
,
""
,
""
,
e
);
}
}
return
result
;
return
result
;
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/coupon/impl/PlatformCouponRelationServiceImpl.java
View file @
fda01825
...
@@ -192,9 +192,6 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
...
@@ -192,9 +192,6 @@ public class PlatformCouponRelationServiceImpl implements CouponRelationService
//只 传递一次, 防止后续开发 多张优惠券使用情况
//只 传递一次, 防止后续开发 多张优惠券使用情况
couponCodeVerificationTransDto
=
null
;
couponCodeVerificationTransDto
=
null
;
}
}
boolean
ok
=
false
;
Exception
lastException
=
null
;
CouponCodeResponseDto
couponCodeResponseDto
=
null
;
try
{
try
{
//71.券核销
//71.券核销
// todo 这循环有啥用-.-
// todo 这循环有啥用-.-
...
...
order-application-service/src/main/java/cn/freemud/service/impl/EvaluationServiceImpl.java
View file @
fda01825
...
@@ -5,7 +5,6 @@ import cn.freemud.base.entity.BaseResponse;
...
@@ -5,7 +5,6 @@ import cn.freemud.base.entity.BaseResponse;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.base.util.DateUtil
;
import
cn.freemud.entities.dto.AddProductEvaluationReqDto
;
import
cn.freemud.entities.dto.AddProductEvaluationReqDto
;
import
cn.freemud.entities.dto.Evaluation.OrderEvaluationStatus
;
import
cn.freemud.entities.dto.Evaluation.OrderEvaluationStatus
;
import
cn.freemud.entities.dto.activity.ActivityRequestCommon
;
import
cn.freemud.entities.dto.activity.CheckAndJoinRequest
;
import
cn.freemud.entities.dto.activity.CheckAndJoinRequest
;
import
cn.freemud.entities.dto.activity.CheckAndJoinResponse
;
import
cn.freemud.entities.dto.activity.CheckAndJoinResponse
;
import
cn.freemud.entities.vo.AddUserOrderEvaluationNewRequestVo
;
import
cn.freemud.entities.vo.AddUserOrderEvaluationNewRequestVo
;
...
@@ -16,10 +15,7 @@ import cn.freemud.enums.ResponseResult;
...
@@ -16,10 +15,7 @@ import cn.freemud.enums.ResponseResult;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.service.EvaluationService
;
import
cn.freemud.service.EvaluationService
;
import
cn.freemud.service.thirdparty.ActivityApplicationClient
;
import
cn.freemud.service.thirdparty.ActivityApplicationClient
;
import
cn.freemud.utils.DateUtils
;
import
cn.freemud.utils.LogUtil
;
import
cn.freemud.utils.ResponseUtil
;
import
cn.freemud.utils.ResponseUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.api.assortment.datamanager.entity.db.AssortmentOrderEvaluation
;
import
com.freemud.api.assortment.datamanager.entity.db.AssortmentOrderEvaluation
;
import
com.freemud.api.assortment.datamanager.entity.db.AssortmentProductEvaluation
;
import
com.freemud.api.assortment.datamanager.entity.db.AssortmentProductEvaluation
;
import
com.freemud.api.assortment.datamanager.entity.dto.InsertOrderEvaluationReqDto
;
import
com.freemud.api.assortment.datamanager.entity.dto.InsertOrderEvaluationReqDto
;
...
@@ -36,7 +32,10 @@ import org.apache.commons.lang.StringUtils;
...
@@ -36,7 +32,10 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* All rights Reserved, Designed By www.freemud.com
* All rights Reserved, Designed By www.freemud.com
...
...
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