From 5c9621477f7edb007bfca851ba2e8884569a9a3d Mon Sep 17 00:00:00 2001 From: dldmsql Date: Mon, 2 Sep 2024 21:15:18 +0900 Subject: [PATCH] =?UTF-8?q?fix(POLABO-128):=20=EB=82=B4=20=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=EB=AA=A9=EB=A1=9D=20=EC=A1=B0=ED=9A=8C=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=20=EC=A1=B0=EA=B1=B4=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/board/repository/BoardJooqRepositoryImpl.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt index 1b31102..4dce3cc 100644 --- a/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt +++ b/src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository/BoardJooqRepositoryImpl.kt @@ -159,6 +159,12 @@ class BoardJooqRepositoryImpl( ): List { val jBoard = Board.BOARD val jPolaroid = Polaroid.POLAROID + val boardSubQuery = + this.dslContext.select(jBoard.ID.`as`("id")) + .from(jBoard) + .where(jBoard.USER_ID.eq(userId).and(jPolaroid.YN.eq(1)).and(jPolaroid.ACTIVEYN.eq(1))) + .asTable() + val data = this.dslContext.select( jBoard.ID, jBoard.TITLE, @@ -169,6 +175,10 @@ class BoardJooqRepositoryImpl( jBoard.ID.eq(jPolaroid.BOARD_ID).and(jPolaroid.USER_ID.eq(userId)) .and(jPolaroid.YN.eq(1)).and(jPolaroid.ACTIVEYN.eq(1)) ) + .where(jBoard.ID.notIn( + this.dslContext.select(boardSubQuery.field("id", ByteArray::class.java)) + .from(boardSubQuery) + )) return data.map { MyBoardDto.Companion.PageListRes(