fix: 修复提交时,会创建临时单号的bug
This commit is contained in:
parent
b95b5c29cb
commit
1a0e4c65c1
|
@ -338,7 +338,7 @@ public class OrderQuery {
|
|||
}
|
||||
|
||||
// 这里查询出来的订单,需要保存它的状态
|
||||
routeRepository.save(routeOrder);
|
||||
routeRepository.saveTempRouteOrder(routeOrder,24L);
|
||||
|
||||
List<Location> locationList = new ArrayList<>();
|
||||
User currentUser = userHttpRequest.loadUserInfo(
|
||||
|
|
|
@ -121,14 +121,14 @@ public class LegEventHandler implements LegEventService {
|
|||
String sysCode = data.getSysCode();
|
||||
//先查看是否已保存到数据库,再从redis获取,如果没有的话再从数据库获取
|
||||
RouteOrder routeOrder = routeRepository.
|
||||
findByActualOrderNoAndSysCode(data.getActualOrderNo(), sysCode);
|
||||
if (routeOrder == null) {
|
||||
routeOrder = routeRepository.findTempRouteOrderBySysCodeAndBillCode(sysCode, fakeOrderNo);
|
||||
}
|
||||
findByFakeOrderNoAndSysCode(data.getActualOrderNo(), sysCode);
|
||||
if (routeOrder == null) {
|
||||
routeOrder = routeRepository
|
||||
.findByFakeOrderNoAndSysCode(fakeOrderNo, sysCode);
|
||||
}
|
||||
if (routeOrder == null) {
|
||||
routeOrder = routeRepository.findTempRouteOrderBySysCodeAndBillCode(sysCode, fakeOrderNo);
|
||||
}
|
||||
routeOrder.reloadStatus();
|
||||
if (routeOrder.getLegItems().isEmpty()) {
|
||||
throw new OrderException(CommonMessageConstant.LEG_ERROR);
|
||||
|
@ -160,8 +160,7 @@ public class LegEventHandler implements LegEventService {
|
|||
command.order(save);
|
||||
|
||||
//异步执行自动同步功能
|
||||
Command.of(RouteAutoSyncCommand.class).route(routeRepository
|
||||
.findByFakeOrderNoAndSysCode(fakeOrderNo, sysCode)).async().sendToQueue();
|
||||
Command.of(RouteAutoSyncCommand.class).route(save).async().sendToQueue();
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
|
Loading…
Reference in New Issue