From 524b2ec95835268194654998dca56f451432f57e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=AA=85=EB=B2=94?= <72181693+mungmnb777@users.noreply.github.com> Date: Thu, 8 Feb 2024 02:04:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=B0=9B=EC=9D=80=20=EB=96=A1=EA=B5=AD?= =?UTF-8?q?=20=EC=9E=AC=EB=A3=8C=20=EC=A1=B0=ED=9A=8C=20API=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../application/dto/response/ReceivedIngredientResponse.java | 3 ++- .../support/infra/persistence/SupportQueryRepository.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/tteokguk/tteokguk/support/application/dto/response/ReceivedIngredientResponse.java b/src/main/java/com/tteokguk/tteokguk/support/application/dto/response/ReceivedIngredientResponse.java index 3be3b09..c38f4c6 100644 --- a/src/main/java/com/tteokguk/tteokguk/support/application/dto/response/ReceivedIngredientResponse.java +++ b/src/main/java/com/tteokguk/tteokguk/support/application/dto/response/ReceivedIngredientResponse.java @@ -8,6 +8,7 @@ public record ReceivedIngredientResponse( String nickname, Ingredient ingredient, String message, - boolean access + boolean access, + Long supportedTteokgukId ) { } diff --git a/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportQueryRepository.java b/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportQueryRepository.java index b4ca1a5..0bef1a6 100644 --- a/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportQueryRepository.java +++ b/src/main/java/com/tteokguk/tteokguk/support/infra/persistence/SupportQueryRepository.java @@ -29,7 +29,7 @@ public List getReceivedIngredientResponse( return query .select(getReceivedIngredientResponseConstructorExpression()) .from(support) - .where(support.id.in(supportIds)) + .where(support.id.in(supportIds).and(support.supportedTteokguk.deleted.eq(false))) .orderBy(support.id.desc()) .fetch(); } @@ -70,7 +70,8 @@ private ConstructorExpression getReceivedIngredientR support.sender.nickname, support.supportIngredient, support.message, - support.access + support.access, + support.supportedTteokguk.id ); } }