-
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.
* feat: 주변 음식점 조회 유즈케이스 정의 * feat: 중심 좌표로부터 거리에 따른 검색 영역 생성 * feat: 좌표범위내 음식점 조회 쿼리 추가 * feat: 주변 음식점 조회 구현 * refactor: 좌표내 음식점 조회 메서드 시그니처 수정 * refactor: 음식점 기준으로 주변 음식점 조회 하도록 수정 * feat: 주변 음식점 조회 API 추가
- Loading branch information
1 parent
e2a4d87
commit b43bc15
Showing
13 changed files
with
266 additions
and
39 deletions.
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
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
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
6 changes: 6 additions & 0 deletions
6
...in/kotlin/com/celuveat/restaurant/application/port/in/query/ReadNearbyRestaurantsQuery.kt
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,6 @@ | ||
package com.celuveat.restaurant.application.port.`in`.query | ||
|
||
data class ReadNearbyRestaurantsQuery( | ||
val memberId: Long?, | ||
val restaurantId: Long, | ||
) |
7 changes: 7 additions & 0 deletions
7
...kotlin/com/celuveat/restaurant/application/port/in/result/ReadNearbyRestaurantsUseCase.kt
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,7 @@ | ||
package com.celuveat.restaurant.application.port.`in`.result | ||
|
||
import com.celuveat.restaurant.application.port.`in`.query.ReadNearbyRestaurantsQuery | ||
|
||
interface ReadNearbyRestaurantsUseCase { | ||
fun readNearbyRestaurants(query: ReadNearbyRestaurantsQuery): List<RestaurantPreviewResult> | ||
} |
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
27 changes: 27 additions & 0 deletions
27
src/test/kotlin/com/celuveat/common/utils/geometry/SquarePolygonTest.kt
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,27 @@ | ||
package com.celuveat.common.utils.geometry | ||
|
||
import io.kotest.core.spec.style.StringSpec | ||
import io.kotest.matchers.shouldBe | ||
import io.kotest.matchers.shouldNotBe | ||
|
||
class SquarePolygonTest : StringSpec({ | ||
"SquarePolygon 생성" { | ||
val squarePolygon = SquarePolygon.ofNullable( | ||
lowLongitude = 1.0, | ||
highLongitude = 2.0, | ||
lowLatitude = 3.0, | ||
highLatitude = 4.0 | ||
) | ||
squarePolygon shouldNotBe null | ||
} | ||
|
||
"좌표가 하나라도 null이면 SquarePolygon은 생성 되지 않는다" { | ||
val squarePolygon = SquarePolygon.ofNullable( | ||
lowLongitude = 1.0, | ||
highLongitude = 2.0, | ||
lowLatitude = 3.0, | ||
highLatitude = null | ||
) | ||
squarePolygon shouldBe null | ||
} | ||
}) |
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
Oops, something went wrong.