From 73544f2ae069d54ddfd642086b234116eec89c1e Mon Sep 17 00:00:00 2001 From: anxi01 Date: Sat, 30 Mar 2024 17:27:15 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat=20:=20=EC=A1=B0=ED=9A=8C=20response?= =?UTF-8?q?=EC=97=90=20storeId=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zerozero/domain/naver/dto/response/SearchLocalResponse.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/zerozero/domain/naver/dto/response/SearchLocalResponse.java b/src/main/java/com/zerozero/domain/naver/dto/response/SearchLocalResponse.java index 61f8b19..e7da93b 100644 --- a/src/main/java/com/zerozero/domain/naver/dto/response/SearchLocalResponse.java +++ b/src/main/java/com/zerozero/domain/naver/dto/response/SearchLocalResponse.java @@ -30,6 +30,7 @@ public static class SearchLocalItem { private int mapx; private int mapy; private boolean selling; + private long storeId; public String getTitle() { return deleteHtmlTags(this.title); From c4789014f741d8536daf1f6453d608738bced189 Mon Sep 17 00:00:00 2001 From: anxi01 Date: Sat, 30 Mar 2024 17:27:49 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat=20:=20=EB=93=B1=EB=A1=9D=EB=90=9C=20?= =?UTF-8?q?=ED=8C=90=EB=A7=A4=EC=A0=90=20id=20=EC=A1=B0=ED=9A=8C=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=A1=9C=EC=A7=81=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zerozero/domain/store/application/StoreService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/zerozero/domain/store/application/StoreService.java b/src/main/java/com/zerozero/domain/store/application/StoreService.java index 17fbf16..6033c78 100644 --- a/src/main/java/com/zerozero/domain/store/application/StoreService.java +++ b/src/main/java/com/zerozero/domain/store/application/StoreService.java @@ -60,6 +60,11 @@ public StoreListResponse search(String query) { if (isSelling) { item.setSellingTrue(); + + Store store = storeRepository.findByNameAndMapxAndMapyAndSellingIsTrue( + item.getTitle(), item.getMapx(), item.getMapy()); + + item.setStoreId(store.getId()); } storeInfos.add(item); From e9397f86e589495dfb61790653878010814c8757 Mon Sep 17 00:00:00 2001 From: anxi01 Date: Sat, 30 Mar 2024 17:28:12 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat=20:=20=ED=8C=90=EB=A7=A4=EC=A0=90=20?= =?UTF-8?q?=EC=A1=B0=ED=9A=8C=ED=95=98=EB=8A=94=20=EB=A9=94=EC=86=8C?= =?UTF-8?q?=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/zerozero/domain/store/repository/StoreRepository.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/zerozero/domain/store/repository/StoreRepository.java b/src/main/java/com/zerozero/domain/store/repository/StoreRepository.java index 9b08f0b..b4cc6ea 100644 --- a/src/main/java/com/zerozero/domain/store/repository/StoreRepository.java +++ b/src/main/java/com/zerozero/domain/store/repository/StoreRepository.java @@ -16,4 +16,6 @@ public interface StoreRepository extends JpaRepository { Boolean existsByNameAndMapxAndMapyAndSellingIsTrue(String name, int mapx, int mapy); List findAllByUser(User user); + + Store findByNameAndMapxAndMapyAndSellingIsTrue(String title, int mapx, int mapy); } \ No newline at end of file