Commit af2a03cd by 吕明尚

修改续单

parent 8466fca6
......@@ -100,10 +100,9 @@ public class RoomStatusServiceImpl implements RoomStatusService {
if (orderType.equals(OrderTypeEnum.RENEW.getCode())) {
if (CollectionUtils.isNotEmpty(orderList)) {
//查询当前用户是否有使用中的订单
orderList = orderList.stream().filter(order -> order.getConsumerId().compareTo(user.getId()) == 0).collect(Collectors.toList());
if (CollectionUtils.isEmpty(orderList)) {
orderList = orderList.stream().filter(order -> order.getConsumerId().compareTo(user.getId()) == 0 && order.getStatus().equals(OrderStatusEnum.INUSE.getCode())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(orderList)) {
isAvailable = true;
}
} else {
LambdaQueryWrapper<SOrder> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SOrder::getRoomId, room.getId());
......@@ -118,6 +117,7 @@ public class RoomStatusServiceImpl implements RoomStatusService {
isAvailable = false;
}
}
}
} else {
isAvailable = false;
}
......
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