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
52365601
Commit
52365601
authored
Aug 15, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单V值触发测试接口
parent
eef3c4ae
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
6 deletions
+11
-6
ScoreProducerApi.java
.../cn/iocoder/yudao/module/member/api/ScoreProducerApi.java
+1
-1
ScoreRuleController.java
...ember/controller/admin/scoreRule/ScoreRuleController.java
+2
-2
OrderVStrategy.java
.../module/member/mq/consumer/score/core/OrderVStrategy.java
+1
-1
ScoreMessage.java
.../iocoder/yudao/module/member/mq/message/ScoreMessage.java
+4
-0
ScoreProducer.java
.../yudao/module/member/mq/producer/score/ScoreProducer.java
+2
-1
BoxServiceImpl.java
...der/yudao/module/shipment/service/box/BoxServiceImpl.java
+1
-1
No files found.
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/api/ScoreProducerApi.java
View file @
52365601
...
...
@@ -6,7 +6,7 @@ import cn.iocoder.yudao.module.member.enums.ScoreRuleTypeEnum;
* @author zhangfeng
*/
public
interface
ScoreProducerApi
{
void
sendOderMessage
(
ScoreRuleTypeEnum
scoreRuleType
,
Long
orderId
);
void
sendOderMessage
(
ScoreRuleTypeEnum
scoreRuleType
,
Long
orderId
,
String
orderNo
);
void
sendRecommendMessage
(
ScoreRuleTypeEnum
scoreRuleType
,
Long
userId
,
String
referralCode
);
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/scoreRule/ScoreRuleController.java
View file @
52365601
...
...
@@ -121,7 +121,7 @@ public class ScoreRuleController {
@GetMapping
(
"/warehouse-tree-region-list"
)
@ApiOperation
(
"获得目的国、目的城市、目的仓列表"
)
public
CommonResult
<
List
<
WarehouseTreeRegionSimpleVO
>>
warehouseTreeRegionList
()
{
List
<
WarehouseTreeRegionSimpleVO
>
list
=
scoreRuleService
.
getWarehouseTreeRegionListSimple
();
List
<
WarehouseTreeRegionSimpleVO
>
list
=
scoreRuleService
.
getWarehouseTreeRegionListSimple
();
return
success
(
list
);
}
...
...
@@ -129,7 +129,7 @@ public class ScoreRuleController {
@ApiOperation
(
"测试订单V值触发"
)
public
CommonResult
<
Void
>
testScoreRule
(
@RequestParam
Long
orderId
,
@RequestParam
String
orderNo
)
{
//applicationContext.publishEvent(new OrderInShippingEvent(orderId, orderNo));
scoreProducerApi
.
sendOderMessage
(
ScoreRuleTypeEnum
.
ORDER_V
,
orderId
);
scoreProducerApi
.
sendOderMessage
(
ScoreRuleTypeEnum
.
ORDER_V
,
orderId
<=
0
?
null
:
orderId
,
orderNo
);
return
success
(
null
);
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OrderVStrategy.java
View file @
52365601
...
...
@@ -51,7 +51,7 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
// 获取订单信息
OrderRespDTO
order
;
try
{
order
=
orderApi
.
getOrder
(
orderId
,
""
);
order
=
orderApi
.
getOrder
(
orderId
,
message
.
getOrderNo
()
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Order in shipping listener: Get order error,orderId:{}"
,
orderId
,
e
);
return
;
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/message/ScoreMessage.java
View file @
52365601
...
...
@@ -20,6 +20,10 @@ public class ScoreMessage extends AbstractStreamMessage {
* 订单ID:订单V值消息必填
*/
private
Long
orderId
;
/**
* 订单编号:目前仅测试使用
*/
private
String
orderNo
;
/**
* userID:注册必填
*/
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/producer/score/ScoreProducer.java
View file @
52365601
...
...
@@ -19,10 +19,11 @@ public class ScoreProducer implements ScoreProducerApi {
private
RedisMQTemplate
redisMQTemplate
;
@Override
public
void
sendOderMessage
(
ScoreRuleTypeEnum
scoreRuleType
,
Long
orderId
)
{
public
void
sendOderMessage
(
ScoreRuleTypeEnum
scoreRuleType
,
Long
orderId
,
String
orderNo
)
{
ScoreMessage
message
=
ScoreMessage
.
builder
()
.
scoreRuleType
(
scoreRuleType
)
.
orderId
(
orderId
)
.
orderNo
(
orderNo
)
.
build
();
redisMQTemplate
.
send
(
message
);
}
...
...
yudao-module-shipment/yudao-module-shipment-core/src/main/java/cn/iocoder/yudao/module/shipment/service/box/BoxServiceImpl.java
View file @
52365601
...
...
@@ -1875,7 +1875,7 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
updateOrderStatusByOrderIdAndTransportType
(
orderIdList
,
orderStatus
,
inWarehouseState
,
shipmentState
,
auditType
,
auditResult
,
businessTime
,
estTime
,
transportType
);
if
(
Objects
.
equals
(
orderStatus
,
OrderStatusEnum
.
IN_SHIPPING
.
getValue
()))
{
for
(
Long
orderId
:
orderIdList
)
{
scoreProducerApi
.
sendOderMessage
(
ScoreRuleTypeEnum
.
ORDER_V
,
orderId
);
scoreProducerApi
.
sendOderMessage
(
ScoreRuleTypeEnum
.
ORDER_V
,
orderId
,
null
);
}
}
}
...
...
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