test #332

Merged
klaus merged 15 commits from test into main 2025-07-18 12:33:22 +00:00
1 changed files with 11 additions and 10 deletions
Showing only changes of commit 2192ddc8fa - Show all commits

View File

@ -387,6 +387,15 @@ class LiveRoomQueryRepositoryImpl(
val liveRoom = liveRoom
val subLiveRoom = QLiveRoom.liveRoom
val subQuery = JPAExpressions
.select(subLiveRoom.member.id, subLiveRoom.updatedAt.max())
.from(subLiveRoom)
.where(
subLiveRoom.isActive.isFalse
.and(subLiveRoom.channelName.isNotNull)
)
.groupBy(subLiveRoom.member.id)
return queryFactory
.select(
QGetLatestFinishedLiveQueryResponse(
@ -400,16 +409,8 @@ class LiveRoomQueryRepositoryImpl(
.from(liveRoom)
.innerJoin(liveRoom.member, member)
.where(
liveRoom.updatedAt
.eq(
JPAExpressions.select(subLiveRoom.updatedAt.max())
.from(subLiveRoom)
.where(
subLiveRoom.member.eq(liveRoom.member)
.and(subLiveRoom.isActive.isFalse)
.and(subLiveRoom.channelName.isNotNull)
)
)
Expressions.list(liveRoom.member.id, liveRoom.updatedAt)
.`in`(subQuery)
)
.orderBy(liveRoom.updatedAt.desc())
.offset(offset)