diff --git a/src/main/java/com/mpnp/baechelin/bookmark/dto/BookmarkInfoDto.java b/src/main/java/com/mpnp/baechelin/bookmark/dto/BookmarkInfoDto.java index 36c40ef..f3a444d 100644 --- a/src/main/java/com/mpnp/baechelin/bookmark/dto/BookmarkInfoDto.java +++ b/src/main/java/com/mpnp/baechelin/bookmark/dto/BookmarkInfoDto.java @@ -18,19 +18,32 @@ public class BookmarkInfoDto { private String category; private String phoneNumber; private String storeImageList; + private String elevator; + private String toilet; + private String parking; + private String heightDifferent; + private String approach; private int bookmarkId; private int storeId; public BookmarkInfoDto(Bookmark bookmark){ - this.pointAvg = Math.round(bookmark.getStoreId().getPointAvg()*10)/10.0; - this.name = bookmark.getStoreId().getName(); - this.address = bookmark.getStoreId().getAddress(); - this.category = bookmark.getStoreId().getCategory(); - this.phoneNumber = bookmark.getStoreId().getPhoneNumber(); - this.bookmarkId = bookmark.getId(); - this.storeId = (int) bookmark.getStoreId().getId(); + this.pointAvg = Math.round(bookmark.getStoreId().getPointAvg()*10)/10.0; + this.name = bookmark.getStoreId().getName(); + this.address = bookmark.getStoreId().getAddress(); + this.category = bookmark.getStoreId().getCategory(); + this.phoneNumber = bookmark.getStoreId().getPhoneNumber(); + + this.elevator = bookmark.getStoreId().getElevator(); + this.toilet = bookmark.getStoreId().getToilet(); + this.parking = bookmark.getStoreId().getParking(); + this.heightDifferent = bookmark.getStoreId().getHeightDifferent(); + this.approach = bookmark.getStoreId().getApproach(); + + this.bookmarkId = bookmark.getId(); + this.storeId = (int) bookmark.getStoreId().getId(); + if(!bookmark.getStoreId().getStoreImageList().isEmpty()) { this.storeImageList = bookmark.getStoreId().getStoreImageList().get(0).getStoreImageUrl(); diff --git a/src/main/java/com/mpnp/baechelin/bookmark/dto/FolderResponseDto.java b/src/main/java/com/mpnp/baechelin/bookmark/dto/FolderResponseDto.java index 255d3e0..941e615 100644 --- a/src/main/java/com/mpnp/baechelin/bookmark/dto/FolderResponseDto.java +++ b/src/main/java/com/mpnp/baechelin/bookmark/dto/FolderResponseDto.java @@ -33,29 +33,7 @@ public static FolderResponseDto FolderDtoRes(Folder folder) { if(folder.getBookmarkList() != null) { for (Bookmark bookmark : folder.getBookmarkList()) { - double pointAvg = Math.round(bookmark.getStoreId().getPointAvg()*10)/10.0; // 업장 별점 - String name = bookmark.getStoreId().getName(); // 업장 이름 - String address = bookmark.getStoreId().getAddress(); // 업장 주소 - String category = bookmark.getStoreId().getCategory(); // 업장 카테고리 - String PhoneNumber = bookmark.getStoreId().getPhoneNumber(); // 업장 전화번호 - int bookmarkId = bookmark.getId(); - int storeId = (int) bookmark.getStoreId().getId(); - - List BookmarkInfoDtoList = new ArrayList<>(); // 정보를 담는 리스트 - List storeImageList = bookmark.getStoreId().getStoreImageList();// 업장 이미지 리스트 - - BookmarkInfoDto bookmarkInfoDto = BookmarkInfoDto - .builder() - .bookmarkId(bookmarkId) - .storeId(storeId) - .address(address) - .phoneNumber(PhoneNumber) - .category(category) - .pointAvg(pointAvg) - .name(name) - .storeImageList(!storeImageList.isEmpty() ? storeImageList.get(0).getStoreImageUrl():"") - .build(); - + BookmarkInfoDto bookmarkInfoDto = new BookmarkInfoDto(bookmark); bookmarks.add(bookmarkInfoDto); }