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
364eec95
Commit
364eec95
authored
Jun 24, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-06-24-5提交
parent
c3f57db2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
ProductPriceExceptionHandleListener.java
...e/order/listener/ProductPriceExceptionHandleListener.java
+17
-1
No files found.
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/listener/ProductPriceExceptionHandleListener.java
View file @
364eec95
...
...
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.order.listener;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.common.constant.Constant
;
import
cn.iocoder.yudao.module.order.dal.dataobject.order.zTest
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderException.OrderExceptionDO
;
import
cn.iocoder.yudao.module.order.dal.dataobject.orderItem.OrderItemDO
;
import
cn.iocoder.yudao.module.order.enums.OrderExceptionEnum
;
...
...
@@ -10,7 +11,9 @@ import cn.iocoder.yudao.module.order.service.order.OrderBusinessService;
import
cn.iocoder.yudao.module.order.service.order.OrderQueryService
;
import
cn.iocoder.yudao.module.order.service.orderException.OrderExceptionService
;
import
cn.iocoder.yudao.module.order.vo.orderException.OrderExceptionResultHandlerVo
;
import
cn.iocoder.yudao.module.product.dal.dataobject.coupon.zTest3
;
import
cn.iocoder.yudao.module.product.dal.dataobject.product.ProductPriceDO
;
import
cn.iocoder.yudao.module.product.dal.mysql.coupon.ZTestMapper3
;
import
cn.iocoder.yudao.module.product.vo.productPrice.ClearancePriceEvent
;
import
cn.iocoder.yudao.module.product.vo.productPrice.HandleData
;
import
cn.iocoder.yudao.module.product.vo.productPrice.HandleExceptionEvent
;
...
...
@@ -23,6 +26,8 @@ import org.springframework.stereotype.Component;
import
org.springframework.transaction.event.TransactionPhase
;
import
org.springframework.transaction.event.TransactionalEventListener
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
...
...
@@ -39,6 +44,9 @@ public class ProductPriceExceptionHandleListener {
private
final
OrderExceptionService
orderExceptionService
;
private
final
OrderBusinessService
orderBusinessService
;
@Resource
private
ZTestMapper3
zTestMapper
;
@EventListener
(
HandleExceptionEvent
.
class
)
@Async
public
void
asyncReceive
(
HandleExceptionEvent
event
)
{
...
...
@@ -57,6 +65,11 @@ public class ProductPriceExceptionHandleListener {
public
void
orderOtherFeeEvent
(
HandleData
event
)
{
List
<
ProductPriceDO
>
priceList
=
event
.
getNeedHandleList
();
zTest3
m
=
new
zTest3
();
m
.
setTestname
(
"开始处理价格异常。"
);
m
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
m
);
//ecw_product_price
//找出符合条件的订单
for
(
ProductPriceDO
productPriceDO
:
priceList
)
{
...
...
@@ -112,7 +125,10 @@ public class ProductPriceExceptionHandleListener {
}
else
{
m
=
new
zTest3
();
m
.
setTestname
(
"exceptionDOList 为空"
);
m
.
setCreatedate
(
new
Date
());
zTestMapper
.
insert
(
m
);
}
//只要有价格就处理清关费未报价异常
...
...
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