-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
15 changed files
with
63 additions
and
88 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
6 changes: 3 additions & 3 deletions
6
src/main/kotlin/org/inner/circle/o2oserver/store/application/ReviewFacade.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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package org.inner.circle.o2oserver.store.application | ||
|
||
import org.inner.circle.o2oserver.store.domain.review.ReviewInfo | ||
import org.inner.circle.o2oserver.store.domain.review.ReviewQueryObject | ||
import org.inner.circle.o2oserver.store.domain.review.ReviewService | ||
import org.springframework.data.domain.Pageable | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class ReviewFacade( | ||
private val reviewService: ReviewService, | ||
) { | ||
fun getStoreReviewList(queryObject: ReviewQueryObject): List<ReviewInfo> { | ||
return reviewService.getStoreReviewList(queryObject) | ||
fun getStoreReviewList(storeId: Long, pageable: Pageable): List<ReviewInfo> { | ||
return reviewService.getStoreReviewList(storeId, pageable) | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
src/main/kotlin/org/inner/circle/o2oserver/store/domain/review/ReviewInfo.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
4 changes: 3 additions & 1 deletion
4
src/main/kotlin/org/inner/circle/o2oserver/store/domain/review/ReviewReader.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.inner.circle.o2oserver.store.domain.review | ||
|
||
import org.springframework.data.domain.Pageable | ||
|
||
interface ReviewReader { | ||
fun getStoreReviewList(queryObject: ReviewQueryObject): List<Review> | ||
fun getStoreReviewList(storeId: Long, pageable: Pageable): List<Review> | ||
} |
4 changes: 3 additions & 1 deletion
4
src/main/kotlin/org/inner/circle/o2oserver/store/domain/review/ReviewService.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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
package org.inner.circle.o2oserver.store.domain.review | ||
|
||
import org.springframework.data.domain.Pageable | ||
|
||
interface ReviewService { | ||
fun getStoreReviewList(queryObject: ReviewQueryObject): List<ReviewInfo> | ||
fun getStoreReviewList(storeId: Long, pageable: Pageable): List<ReviewInfo> | ||
} |
5 changes: 3 additions & 2 deletions
5
src/main/kotlin/org/inner/circle/o2oserver/store/domain/review/ReviewServiceImpl.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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package org.inner.circle.o2oserver.store.domain.review | ||
|
||
import org.springframework.data.domain.Pageable | ||
import org.springframework.stereotype.Service | ||
|
||
@Service | ||
class ReviewServiceImpl(private val reviewReader: ReviewReader) : ReviewService { | ||
override fun getStoreReviewList(queryObject: ReviewQueryObject): List<ReviewInfo> { | ||
val reviews = reviewReader.getStoreReviewList(queryObject) | ||
override fun getStoreReviewList(storeId: Long, pageable: Pageable): List<ReviewInfo> { | ||
val reviews = reviewReader.getStoreReviewList(storeId, pageable) | ||
return reviews.map { ReviewInfo(it) } | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
src/main/kotlin/org/inner/circle/o2oserver/store/domain/store/command/StoreListCommand.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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package org.inner.circle.o2oserver.store.domain.store.command | ||
|
||
import org.inner.circle.o2oserver.store.domain.Address | ||
import org.springframework.data.domain.Pageable | ||
|
||
class StoreListCommand( | ||
val address: Address, | ||
val longitude: Double, | ||
val latitude: Double, | ||
val category: String?, | ||
val keyword: String, | ||
val page: Int, | ||
val size: Int, | ||
val pageable: Pageable, | ||
) |
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: 3 additions & 3 deletions
6
src/main/kotlin/org/inner/circle/o2oserver/store/infrastructure/client/ReviewReaderImpl.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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.inner.circle.o2oserver.store.infrastructure.client | ||
|
||
import org.inner.circle.o2oserver.store.domain.review.Review | ||
import org.inner.circle.o2oserver.store.domain.review.ReviewQueryObject | ||
import org.inner.circle.o2oserver.store.domain.review.ReviewReader | ||
import org.springframework.data.domain.Pageable | ||
import org.springframework.stereotype.Component | ||
|
||
@Component | ||
class ReviewReaderImpl(private val reviewApiClient: ReviewApiClient) : ReviewReader { | ||
override fun getStoreReviewList(queryObject: ReviewQueryObject): List<Review> { | ||
val response = reviewApiClient.getStoreReviewList(queryObject.storeId, queryObject.page, queryObject.limit) | ||
override fun getStoreReviewList(storeId: Long, pageable: Pageable): List<Review> { | ||
val response = reviewApiClient.getStoreReviewList(storeId, pageable.pageNumber, pageable.pageSize) | ||
return response.reviews.map { it.toDomain() } | ||
} | ||
} |
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