File tree 1 file changed +10
-0
lines changed
src/main/kotlin/com/ddd/sonnypolabobe/domain/board/repository
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,12 @@ class BoardJooqRepositoryImpl(
159
159
): List <MyBoardDto .Companion .PageListRes > {
160
160
val jBoard = Board .BOARD
161
161
val jPolaroid = Polaroid .POLAROID
162
+ val boardSubQuery =
163
+ this .dslContext.select(jBoard.ID .`as `(" id" ))
164
+ .from(jBoard)
165
+ .where(jBoard.USER_ID .eq(userId).and (jPolaroid.YN .eq(1 )).and (jPolaroid.ACTIVEYN .eq(1 )))
166
+ .asTable()
167
+
162
168
val data = this .dslContext.select(
163
169
jBoard.ID ,
164
170
jBoard.TITLE ,
@@ -169,6 +175,10 @@ class BoardJooqRepositoryImpl(
169
175
jBoard.ID .eq(jPolaroid.BOARD_ID ).and (jPolaroid.USER_ID .eq(userId))
170
176
.and (jPolaroid.YN .eq(1 )).and (jPolaroid.ACTIVEYN .eq(1 ))
171
177
)
178
+ .where(jBoard.ID .notIn(
179
+ this .dslContext.select(boardSubQuery.field(" id" , ByteArray ::class .java))
180
+ .from(boardSubQuery)
181
+ ))
172
182
173
183
return data.map {
174
184
MyBoardDto .Companion .PageListRes (
You can’t perform that action at this time.
0 commit comments