修复订单查询,总数不对的问题

This commit is contained in:
lulz1 2024-03-16 23:00:23 +08:00
parent da61de44f2
commit c8a7699fe4
1 changed files with 4 additions and 2 deletions

View File

@ -132,12 +132,14 @@ public class OrderDetailQuery {
}
}).filter(Objects::nonNull);
List<Object> paginatedResults = orderDetailStream
List<Object> res = orderDetailStream.toList();
List<Object> paginatedResults = res.stream()
.skip((long) (pageNum - 1) * pageSize)
.limit(pageSize)
.toList();
return Result.Success(SUCCESS, PageResult.totalPageNum((long) orderDetailList.size(), paginatedResults));
return Result.Success(SUCCESS, PageResult.totalPageNum((long) res.size(), paginatedResults));
}
private Object processHotelOrderDetail(OrderDetail orderDetail, String systemType) {