Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
733f1899
Commit
733f1899
authored
Aug 02, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单V值删完善日志
parent
ccac072e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
OderVStrategy.java
...o/module/member/mq/consumer/score/core/OderVStrategy.java
+7
-6
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OderVStrategy.java
View file @
733f1899
...
...
@@ -51,13 +51,13 @@ public class OderVStrategy implements ScoreRuleStrategy {
@Override
public
void
addScore
(
ScoreMessage
message
)
{
log
.
info
(
"
订单V值增加积分"
);
log
.
info
(
"
Received order V message,orderID:{}"
,
message
.
getOrderId
()
);
Long
orderId
=
message
.
getOrderId
();
OrderRespDTO
order
;
try
{
order
=
orderApi
.
getOrder
(
orderId
,
""
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Order in shipping listener: Get order error,orderId:{}
,orderNo:{}"
,
orderId
,
""
);
log
.
error
(
"Order in shipping listener: Get order error,orderId:{}
"
,
orderId
,
e
);
return
;
}
if
(
Objects
.
isNull
(
order
))
{
...
...
@@ -72,12 +72,12 @@ public class OderVStrategy implements ScoreRuleStrategy {
Integer
transportId
=
order
.
getTransportId
();
ScoreRuleDO
scoreRuleDO
=
scoreRuleService
.
getEnabledOrderVScoreRuleByTransportType
(
transportId
);
if
(
Objects
.
isNull
(
scoreRuleDO
))
{
log
.
info
(
"Order in shipping listener: No score rule match
"
);
log
.
info
(
"Order in shipping listener: No score rule match
,orderID:{}"
,
orderId
);
return
;
}
// 是否过期,或者活动还没开始
if
(!
scoreRuleDO
.
getEndTime
().
after
(
new
Date
())
||
!
scoreRuleDO
.
getStartTime
().
before
(
new
Date
()))
{
log
.
info
(
"Order in shipping listener: The score rule has expired
"
);
log
.
info
(
"Order in shipping listener: The score rule has expired
,scoreRuleID:{}"
,
scoreRuleDO
.
getId
()
);
return
;
}
// 目的地信息
...
...
@@ -117,7 +117,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
// 订单入口
String
orderEntryString
=
extraInfo
.
getOrderEntry
();
if
(
StringUtils
.
isBlank
(
orderEntryString
))
{
log
.
info
(
"Order in shipping listener: orderEntry is null
"
);
log
.
info
(
"Order in shipping listener: orderEntry is null
,scoreRuleID:{}"
,
scoreRuleDO
.
getId
()
);
return
;
}
String
[]
orderEntry
=
orderEntryString
.
split
(
","
);
...
...
@@ -149,7 +149,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
// 是否首单,首单只加一次
if
(
extraInfo
.
getFirstOrder
()
==
YesOrNoTypeEnum
.
YES
.
ordinal
())
{
if
(!
orderApi
.
isFirstOrder
(
userId
))
{
log
.
info
(
"Order in shipping listener: Not first order
"
);
log
.
info
(
"Order in shipping listener: Not first order
,userId:{}"
,
userId
);
return
;
}
}
...
...
@@ -188,6 +188,7 @@ public class OderVStrategy implements ScoreRuleStrategy {
}
catch
(
Exception
e
)
{
log
.
error
(
"Order in shipping listener: operateScore error"
,
e
);
}
log
.
info
(
"Order V rule add score success,ruleID:{},orderID:{},userID:{}"
,
scoreRuleDO
.
getId
(),
message
.
getOrderId
(),
userId
);
}
@Override
...
...
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