diff --git a/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothFindPort.java b/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothFindPort.java index 82a4e9a..5c79243 100644 --- a/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothFindPort.java +++ b/domain/src/main/java/com/pocket/domain/port/photobooth/PhotoBoothFindPort.java @@ -10,6 +10,6 @@ public interface PhotoBoothFindPort { PhotoBoothFindResponseDto findById(Long id); - List getPhotoboothWithin2Km(double currentLat, double currentLon, PhotoBoothBrand brand); + List getPhotoboothWithin2Km(double currentLat, double currentLon, List brand); } diff --git a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothFindService.java b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothFindService.java index 6d18281..4b96f80 100644 --- a/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothFindService.java +++ b/domain/src/main/java/com/pocket/domain/service/photobooth/PhotoBoothFindService.java @@ -21,7 +21,7 @@ public PhotoBoothFindResponseDto findPhotoBoothResponse(Long id) { return photoBoothFindPort.findById(id); } - public List findNearPhotoBooth(double lat, double lon, PhotoBoothBrand brand) { + public List findNearPhotoBooth(double lat, double lon, List brand) { return photoBoothFindPort.getPhotoboothWithin2Km(lat, lon, brand); } } diff --git a/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothFindUseCase.java b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothFindUseCase.java index 053d5ad..eb067c9 100644 --- a/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothFindUseCase.java +++ b/domain/src/main/java/com/pocket/domain/usecase/photobooth/PhotoBoothFindUseCase.java @@ -10,6 +10,6 @@ public interface PhotoBoothFindUseCase { PhotoBoothFindResponseDto findPhotoBoothResponse(Long id); - List findNearPhotoBooth(double lat, double lon, PhotoBoothBrand brand); + List findNearPhotoBooth(double lat, double lon, List brand); } diff --git a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java index b4a66e1..46d44ed 100644 --- a/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java +++ b/inbounds/src/main/java/com/pocket/inbounds/photobooth/presentation/PhotoBoothController.java @@ -28,7 +28,7 @@ public ApplicationResponse getPhotoBoothById(@PathVar public ApplicationResponse> getAllPhotoBooth( @RequestParam("lat") double lat, @RequestParam("lon") double lon, - @RequestParam(value = "brand", required = false) PhotoBoothBrand brand + @RequestParam(value = "brand", required = false) List brand ) { List responses = photoBoothFindUseCase.findNearPhotoBooth(lat, lon, brand); diff --git a/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adpater/PhotoBoothFindAdapter.java b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adpater/PhotoBoothFindAdapter.java index 7875eae..4d4a369 100644 --- a/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adpater/PhotoBoothFindAdapter.java +++ b/outbound/src/main/java/com/pocket/outbound/adapter/photobooth/adpater/PhotoBoothFindAdapter.java @@ -35,14 +35,14 @@ public PhotoBoothFindResponseDto findById(Long id) { ); } - public List getPhotoboothWithin2Km(double currentLat, double currentLon, PhotoBoothBrand brand) { + public List getPhotoboothWithin2Km(double currentLat, double currentLon, List brands) { // 모든 포토부스 데이터를 가져옵니다. List allPhotobooths; - if (brand != null) { - // 지정된 브랜드로 포토부스를 필터링하여 조회 - allPhotobooths = photoBoothRepository.findByPhotoBoothPhotoBoothBrand(brand); + if (brands != null && !brands.isEmpty()) { + // 지정된 브랜드 목록으로 포토부스를 필터링하여 조회 + allPhotobooths = photoBoothRepository.findByPhotoBoothPhotoBoothBrandIn(brands); } else { // 브랜드 필터링 없이 모든 포토부스 조회 allPhotobooths = photoBoothRepository.findAll(); diff --git a/outbound/src/main/java/com/pocket/outbound/repository/PhotoBoothRepository.java b/outbound/src/main/java/com/pocket/outbound/repository/PhotoBoothRepository.java index b3946cb..497f18a 100644 --- a/outbound/src/main/java/com/pocket/outbound/repository/PhotoBoothRepository.java +++ b/outbound/src/main/java/com/pocket/outbound/repository/PhotoBoothRepository.java @@ -8,5 +8,5 @@ public interface PhotoBoothRepository extends JpaRepository { - List findByPhotoBoothPhotoBoothBrand(PhotoBoothBrand photoBoothBrand); + List findByPhotoBoothPhotoBoothBrandIn(List brands); }