-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
128 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/Journey/Together/domain/place/dto/response/PlaceDetailRes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package Journey.Together.domain.place.dto.response; | ||
|
||
import Journey.Together.domain.place.entity.Place; | ||
|
||
import java.util.List; | ||
|
||
public record PlaceDetailRes( | ||
Long placeId, | ||
String name, | ||
String imgae, | ||
String address, | ||
String category, | ||
String overview, | ||
String mapX, | ||
String mapY, | ||
|
||
Boolean isMark, | ||
|
||
Integer bookmarkNum, | ||
|
||
List<Long> disability, | ||
List<Long> subDisability, | ||
List<PlaceReviewDto> reviewList | ||
) { | ||
static String cat = "관광지"; | ||
public static PlaceDetailRes of(Place place, Boolean isMark, Integer bookmarkNum, List<Long> disability, List<Long> subDisability, List<PlaceReviewDto> reviewList){ | ||
if(place.getCategory().equals("B02")) | ||
cat = "숙소"; | ||
else if (place.getCategory().equals("A05")) | ||
cat = "맛집"; | ||
|
||
|
||
|
||
return new PlaceDetailRes(place.getId(), place.getName(), place.getFirstImg(), place.getAddress(), cat, place.getOverview(), place.getMapX(), place.getMapY(), isMark, | ||
bookmarkNum, disability, subDisability, reviewList); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/Journey/Together/domain/place/dto/response/PlaceReviewDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package Journey.Together.domain.place.dto.response; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
public record PlaceReviewDto( | ||
Long reviewId, | ||
String nickname, | ||
String profileImg, | ||
String content, | ||
String reviewImg, | ||
Float grade, | ||
LocalDateTime date) { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
src/main/java/Journey/Together/domain/placeBookbark/repository/PlaceBookmarkRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package Journey.Together.domain.placeBookbark.repository; | ||
|
||
|
||
import Journey.Together.domain.place.entity.Place; | ||
import Journey.Together.domain.placeBookbark.entity.PlaceBookmark; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
import org.springframework.data.repository.query.Param; | ||
|
||
import java.util.List; | ||
|
||
public interface PlaceBookmarkRepository extends JpaRepository<PlaceBookmark, Long> { | ||
|
||
List<PlaceBookmark> findAllByPlace(Place place); | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters