Skip to content

Commit

Permalink
# 103 feature: 가격 0원일시 100,000으로 응답
Browse files Browse the repository at this point in the history
  • Loading branch information
wocjf0513 committed Dec 10, 2023
1 parent 5899205 commit 85ee29b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public static ProductResponse toProductResponse(Product product) {
.price(product.getRooms().isEmpty()
? 0 :
product.getRooms().stream().map(PricePickerByDateUtil::getPrice)
.map(price->price==0?100000:price)
.min((o1, o2) -> Math.toIntExact(o1 - o2))
.orElseThrow())
.capacity(product.getRooms().isEmpty()
Expand Down

0 comments on commit 85ee29b

Please sign in to comment.