Commit d6811845 authored by zhangfeng's avatar zhangfeng

订单V值触发

parent 8f123cc5
......@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.framework.apollo.core.event.OrderInShippingEvent;
import cn.iocoder.yudao.framework.common.util.spring.enums.CommonStatusEnum;
import cn.iocoder.yudao.framework.common.exception.ServiceException;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
......@@ -204,6 +205,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
......@@ -420,6 +422,9 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
@Lazy
private BoxPkgOrderService boxPkgOrderService;
@Resource
private ApplicationContext applicationContext;
static {
String key = "130-4174-1";
minNumMap.put(key, 3633);
......@@ -1868,6 +1873,11 @@ public class BoxServiceImpl extends AbstractService<BoxMapper, BoxDO> implements
//订单不存在
if (CollectionUtil.isEmpty(orderIdList)) return;
updateOrderStatusByOrderIdAndTransportType(orderIdList, orderStatus, inWarehouseState, shipmentState, auditType, auditResult, businessTime, estTime, transportType);
if (Objects.equals(orderStatus, OrderStatusEnum.IN_SHIPPING.getValue())) {
for (Long orderId : orderIdList) {
applicationContext.publishEvent(new OrderInShippingEvent(orderId,null));
}
}
}
@Override
......
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