From 96d4a1abd4445b58655c280efecc8fd4de60032b Mon Sep 17 00:00:00 2001 From: elive7 Date: Sun, 24 Nov 2024 14:25:31 +0900 Subject: [PATCH] =?UTF-8?q?[hotfix]=20fix:=20=EB=85=B8=ED=8A=B8=20?= =?UTF-8?q?=EB=8B=A8=EA=B1=B4=20=EC=A1=B0=ED=9A=8C=EC=8B=9C=20=EB=8C=93?= =?UTF-8?q?=EA=B8=80=20=EC=97=86=EB=8A=94=20=EB=85=B8=ED=8A=B8=EB=8F=84=20?= =?UTF-8?q?=EC=A0=95=EC=83=81=EC=A1=B0=ED=9A=8C=EB=90=98=EB=8F=84=EB=A1=9D?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/impl/QueryDslNoteQueryRepository.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/projectlyrics/server/domain/note/repository/impl/QueryDslNoteQueryRepository.java b/src/main/java/com/projectlyrics/server/domain/note/repository/impl/QueryDslNoteQueryRepository.java index 56e76b55..4784f1ac 100644 --- a/src/main/java/com/projectlyrics/server/domain/note/repository/impl/QueryDslNoteQueryRepository.java +++ b/src/main/java/com/projectlyrics/server/domain/note/repository/impl/QueryDslNoteQueryRepository.java @@ -58,11 +58,12 @@ public Optional findById(Long id, Long userId) { .where( note.id.eq(id), note.deletedAt.isNull(), - comment.writer.notIn( - JPAExpressions.select(block.blocked) - .from(block) - .where(block.blocker.id.eq(userId).and(block.deletedAt.isNull())) - ) + comment.isNull() + .or(comment.writer.notIn( + JPAExpressions.select(block.blocked) + .from(block) + .where(block.blocker.id.eq(userId).and(block.deletedAt.isNull())) + )) ) .fetchOne() );