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
13e40bcb
Commit
13e40bcb
authored
Oct 12, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat-596: 订单V值首单逻辑修改
parent
b15ab262
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
OrderVStrategy.java
.../module/member/mq/consumer/score/core/OrderVStrategy.java
+7
-7
OrderApi.java
.../main/java/cn/iocoder/boot/module/order/api/OrderApi.java
+2
-2
OrderApiImpl.java
.../java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
+3
-3
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OrderVStrategy.java
View file @
13e40bcb
...
...
@@ -212,8 +212,8 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
userId
=
0L
;
}
}
// 校验首单
if
(!
isFirstOrderValid
(
user
Id
,
extraInfo
))
{
// 校验首单
:发货和收货都算首单,按客户查,只有发货人收货人都是首单才算首单
if
(!
isFirstOrderValid
(
consignorId
,
consignee
Id
,
extraInfo
))
{
return
null
;
}
// 校验积分上限,添加加分用户列表
...
...
@@ -260,14 +260,14 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
/**
* 校验是否为首单且首单是否有效
*/
private
boolean
isFirstOrderValid
(
Long
user
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
private
boolean
isFirstOrderValid
(
Long
consignorId
,
Long
consignee
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
if
(
extraInfo
.
getFirstOrder
()
==
YesOrNoTypeEnum
.
YES
.
ordinal
())
{
if
(
userId
==
null
||
userId
<=
0
)
{
log
.
info
(
"Order in shipping listener:
The user is not member,userId:{}"
,
use
rId
);
if
(
!
orderApi
.
isFirstOrder
(
consignorId
)
)
{
log
.
info
(
"Order in shipping listener:
consignor not first order,consignorId:{}"
,
consigno
rId
);
return
false
;
}
if
(!
orderApi
.
isFirstOrder
(
user
Id
))
{
log
.
info
(
"Order in shipping listener:
Not first order,userId:{}"
,
user
Id
);
if
(!
orderApi
.
isFirstOrder
(
consignee
Id
))
{
log
.
info
(
"Order in shipping listener:
consignee not first order,consigneeId:{}"
,
consignee
Id
);
return
false
;
}
}
...
...
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/OrderApi.java
View file @
13e40bcb
...
...
@@ -14,9 +14,9 @@ public interface OrderApi {
*/
OrderRespDTO
getOrder
(
Long
id
,
String
orderNo
);
/**
* 判断
是否用户
首单
* 判断
客户是否
首单
*/
boolean
isFirstOrder
(
Long
us
erId
);
boolean
isFirstOrder
(
Long
custom
erId
);
/**
* 根据订单id获取所有订单项
*/
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
View file @
13e40bcb
...
...
@@ -87,9 +87,9 @@ public class OrderApiImpl implements OrderApi {
}
@Override
public
boolean
isFirstOrder
(
Long
us
erId
)
{
Long
count
=
orderService
.
selectCount
(
new
LambdaQueryWrapper
<
OrderDO
>().
eq
(
OrderDO:
:
getUserId
,
userId
));
return
count
<=
0
;
public
boolean
isFirstOrder
(
Long
custom
erId
)
{
// 只要发过货或者收过货都不算首单
return
orderConsignorService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
&&
orderConsigneeService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
;
}
@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