Commit 364eec95 authored by lanbaoming's avatar lanbaoming

2024-06-24-5提交

parent c3f57db2
......@@ -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);
}
//只要有价格就处理清关费未报价异常
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment