Commit a074d36b by 吕明尚

订单下单查询预约时间增加查询情况

parent 7b06fa9c
...@@ -1527,9 +1527,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1527,9 +1527,6 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw new BaseException("订单类型异常!"); throw new BaseException("订单类型异常!");
} }
List<SOrder> orderList = list(queryWrapper); List<SOrder> orderList = list(queryWrapper);
List<SOrder> sOrderList = list(sOrderLambdaQueryWrapper);
List<SOrder> orders = list(orderLambdaQueryWrapper);
if (CollectionUtils.isNotEmpty(orderList)) { if (CollectionUtils.isNotEmpty(orderList)) {
Optional<SOrder> lastOrderOp = orderList.stream().max(Comparator.comparing(SOrder::getPreEndDate)); Optional<SOrder> lastOrderOp = orderList.stream().max(Comparator.comparing(SOrder::getPreEndDate));
SOrder lastOrder = lastOrderOp.orElse(null); SOrder lastOrder = lastOrderOp.orElse(null);
...@@ -1558,10 +1555,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme ...@@ -1558,10 +1555,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
} }
throw new BaseException("下单时间已被预定!"); throw new BaseException("下单时间已被预定!");
} }
if (request.getOrderType().equals(OrderTypeEnum.RESERVER.getCode())) {
List<SOrder> sOrderList = list(sOrderLambdaQueryWrapper);
List<SOrder> orders = list(orderLambdaQueryWrapper);
if (CollectionUtils.isNotEmpty(sOrderList) || CollectionUtils.isNotEmpty(orders)) { if (CollectionUtils.isNotEmpty(sOrderList) || CollectionUtils.isNotEmpty(orders)) {
throw new BaseException("下单时间已被预定!"); throw new BaseException("下单时间已被预定!");
} }
} }
}
private void checkOrderRoomStat(SRoom room) { private void checkOrderRoomStat(SRoom room) {
if (ObjectUtil.isEmpty(room)){ if (ObjectUtil.isEmpty(room)){
......
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