Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class GuesthouseDetailDTO {
private String name;
private Long reviewCount;
private Double averageScore;
private Long maxPeople;
private String addressRegion;
private String addressDetail;
private String information;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public GuesthouseDetailDTO getHouseById(Long guesthouseId) {
// 4) 각 Room 정보 + 첫 번째 이미지
List<Room> rooms = gh.getRooms();
List<Long> roomIds = rooms.stream().map(Room::getId).toList();
Long maxPeople = rooms.stream().mapToLong(Room::getTotalCount).max().orElse(0);

// 4-a) 객실 이미지 일괄 조회
List<Image> roomImages = imageRepository
Expand Down Expand Up @@ -119,6 +120,7 @@ public GuesthouseDetailDTO getHouseById(Long guesthouseId) {
)
.addressRegion(gh.getAddressRegion())
.addressDetail(gh.getAddressDetail())
.maxPeople(maxPeople)
.information(gh.getInformation())
.advertisement(gh.getAdvertisement())
.optionServices(optionServices)
Expand Down