From f9a4e6c82da92668e0a30e7edce9bc006887d078 Mon Sep 17 00:00:00 2001 From: Sanghyun Yi Date: Sat, 11 Oct 2025 12:49:38 +0900 Subject: [PATCH 1/2] =?UTF-8?q?ffeat:=20=C3=A3=EA=B2=A8=EA=B2=BD=EB=A7=A4?= =?UTF-8?q?=EC=9E=A5=20=EA=B1=B0=EB=9E=98=20=EB=82=B4=EC=97=AD=20=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=8B=9C=20=EC=83=81=EC=9C=84=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC,=20=ED=95=98=EC=9C=84=20=EC=B9=B4=ED=85=8C?= =?UTF-8?q?=EA=B3=A0=EB=A6=AC,=20=EC=95=84=EC=9D=B4=ED=85=9C=EB=AA=85=20?= =?UTF-8?q?=EC=88=9C=EC=9C=BC=EB=A1=9C=20=20=20=20=EC=9A=B0=EC=84=A0?= =?UTF-8?q?=EC=88=9C=EC=9C=84=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/AuctionHistoryQueryDslRepository.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/until/the/eternity/auctionhistory/infrastructure/persistence/AuctionHistoryQueryDslRepository.java b/src/main/java/until/the/eternity/auctionhistory/infrastructure/persistence/AuctionHistoryQueryDslRepository.java index bf51ba7c..a2cacf8b 100644 --- a/src/main/java/until/the/eternity/auctionhistory/infrastructure/persistence/AuctionHistoryQueryDslRepository.java +++ b/src/main/java/until/the/eternity/auctionhistory/infrastructure/persistence/AuctionHistoryQueryDslRepository.java @@ -39,12 +39,15 @@ public Page search(AuctionHistorySearchRequest condition, Pageab private BooleanBuilder buildPredicate(AuctionHistorySearchRequest c, QAuctionHistory ah) { BooleanBuilder builder = new BooleanBuilder(); - if (c.getItemName() != null && !c.getItemName().isBlank()) { - builder.and(ah.itemName.containsIgnoreCase(c.getItemName())); + if (c.getItemTopCategory() != null && !c.getItemTopCategory().isBlank()) { + builder.and(ah.itemTopCategory.eq(c.getItemTopCategory())); } if (c.getItemSubCategory() != null && !c.getItemSubCategory().isBlank()) { builder.and(ah.itemSubCategory.eq(c.getItemSubCategory())); } + if (c.getItemName() != null && !c.getItemName().isBlank()) { + builder.and(ah.itemName.containsIgnoreCase(c.getItemName())); + } return builder; } } From a3a175e26b72b32adfa6fb3a783b0097f34fadc6 Mon Sep 17 00:00:00 2001 From: Sanghyun Yi Date: Sat, 11 Oct 2025 14:02:08 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20auction=20history=20=20=20top,=20su?= =?UTF-8?q?b=20category,=20item=5Fname=20index=20=EC=83=9D=EC=84=B1=20flyw?= =?UTF-8?q?ay=20script=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/db/migration/V8__create_auction_history_index.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/main/resources/db/migration/V8__create_auction_history_index.sql diff --git a/src/main/resources/db/migration/V8__create_auction_history_index.sql b/src/main/resources/db/migration/V8__create_auction_history_index.sql new file mode 100644 index 00000000..fa98a721 --- /dev/null +++ b/src/main/resources/db/migration/V8__create_auction_history_index.sql @@ -0,0 +1,2 @@ +create index idx_top_sub_item + on auction_history (item_top_category, item_sub_category, item_name); \ No newline at end of file