diff --git a/src/main/java/com/team20/t4/plan/domain/Gu.java b/src/main/java/com/team20/t4/plan/domain/Gu.java index f1dfa6e..5db6c37 100644 --- a/src/main/java/com/team20/t4/plan/domain/Gu.java +++ b/src/main/java/com/team20/t4/plan/domain/Gu.java @@ -10,14 +10,52 @@ @AllArgsConstructor public enum Gu { - JONGRO("종로구"); + JONGROGU("종로구"), + JUNGGU("중구"), + YONGSANGU("용산구"), + SEONGDONGGU("성동구"), + GWANGJINGU("광진구"), + DONGDAEMUNGU("동대문구"), + JUNGANGGU("중랑구"), + SEONGBUKGU("성북구"), + GANGBUKGU("강북구"), + DOBONGGU("도봉구"), + NOWONGU("노원구"), + EUNPYEONGGU("은평구"), + SEODAEMUNGU("서대문구"), + MAPOGU("마포구"), + YANGCHEONGU("양천구"), + GANGSEOGU("강서구"), + GUROGU("구로구"), + GEUMCHEONGU("금천구"), + YEONGDEUNGPOGU("영등포구"), + DONGJAKGU("동작구"), + GWANAKGU("관악구"), + SEOCHOGU("서초구"), + GANGNAMGU("강남구"), + SONGPAGU("송파구"), + GANGDONGGU("강동구"); + @JsonValue private String value; /** * - *종로구 중구 용산구 성동구 광진구 동대문구 중랑구 성북구 강북구 도봉구 노원구 은평구 서대문구 마포구 양천구 강서구 구로구 금천구 영등포구 동작구 관악구 서초구 강남구 송파구 강동구 + *종로구 + * 중구 + * 용산구 + * 성동구 + * 광진구 + * 동대문구 + * 중랑구 + * 성북구 + * 강북구 + * 도봉구 + * 노원구 + * 은평구 + * 서대문구 + * 마포구 양천구 강서구 구로구 금천구 영등포구 동작구 관악구 서초구 강남구 송파구 강동구 * */ @JsonCreator diff --git a/src/main/java/com/team20/t4/post/PostController.java b/src/main/java/com/team20/t4/post/PostController.java index e42ef7a..060be91 100644 --- a/src/main/java/com/team20/t4/post/PostController.java +++ b/src/main/java/com/team20/t4/post/PostController.java @@ -5,6 +5,7 @@ import com.team20.t4.plan.PlanService; import com.team20.t4.plan.domain.Location; import com.team20.t4.plan.dto.ListAppointmentSimpleResponseDto; +import com.team20.t4.post.dto.LocationRequestDto; import com.team20.t4.post.dto.PostResponseDto; import com.team20.t4.post.dto.PostSaveRequestDto; import com.team20.t4.post.dto.PostUpdateRequestDto; @@ -28,10 +29,9 @@ public Long saveNewPost(@RequestBody @Valid PostSaveRequestDto requestDto){ } @GetMapping("/post/location") - public ListAppointmentSimpleResponseDto getPostListByLocation(@RequestBody Location location){ - log.info(location.toString()); - log.info(location.getGu().getValue()); - return postService.getPostListByLocation(location); + public ListAppointmentSimpleResponseDto getPostListByLocation(@RequestBody LocationRequestDto location){ + Location gotLocation = location.getLocation(); + return postService.getPostListByLocation(gotLocation); } @GetMapping("/post/{postId}") diff --git a/src/main/java/com/team20/t4/post/dto/LocationRequestDto.java b/src/main/java/com/team20/t4/post/dto/LocationRequestDto.java new file mode 100644 index 0000000..e3a8189 --- /dev/null +++ b/src/main/java/com/team20/t4/post/dto/LocationRequestDto.java @@ -0,0 +1,9 @@ +package com.team20.t4.post.dto; + +import com.team20.t4.plan.domain.Location; +import lombok.Getter; + +@Getter +public class LocationRequestDto { + private Location location; +}