fix: 查看详情部分行程规划缺少姓名的问题

This commit is contained in:
lulz1 2024-06-20 09:24:23 +08:00
parent a27a9eacae
commit ed0b9beffc
1 changed files with 7 additions and 4 deletions

View File

@ -515,16 +515,19 @@ public class OrderQuery {
legDomainService.queryLocation(legItems);
List<LegRes> list = legItems.stream().map(LegRes::copyFrom).toList();
routeOrderRes.setLegResList(list);
List<OrderDetailRes> orderDetailResList = routeOrder
.getOrderDetails()
}
List<OrderDetail> orderDetails = routeOrder
.getOrderDetails();
if (orderDetails != null && !orderDetails.isEmpty()) {
List<OrderDetailRes> orderDetailResList = orderDetails
.stream()
.filter(it -> !it.getOrderStatus().equals(ORDER_EVENT_CANCEL_NAME) && !it.getOrderStatus().equals(ORDER_EVENT_PREPARE_NAME))
.map(OrderDetailMapper::copyFromExtension)
.toList();
User user = userRepository.findByUserEmployeeNo(routeOrder.getUserId());
routeOrderRes.setUserName(user.getName());
routeOrderRes.setOrderDetailRes(orderDetailResList);
}
User user = userRepository.findByUserEmployeeNo(routeOrder.getUserId());
routeOrderRes.setUserName(user.getName());
return routeOrderRes;
}