라이브 방 태그 언어 우선 적용

This commit is contained in:
2026-01-30 16:41:43 +09:00
parent 6e0b3ddf8e
commit 8c4b599735
2 changed files with 82 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ interface PushTokenRepository : JpaRepository<PushToken, Long>, PushTokenQueryRe
interface PushTokenQueryRepository {
fun findByToken(token: String): PushToken?
fun findByMemberId(memberId: Long): List<PushToken>
fun findByMemberIds(memberIds: List<Long>): List<PushToken>
}
class PushTokenQueryRepositoryImpl(
@@ -27,4 +28,12 @@ class PushTokenQueryRepositoryImpl(
.where(pushToken.member.id.eq(memberId))
.fetch()
}
override fun findByMemberIds(memberIds: List<Long>): List<PushToken> {
if (memberIds.isEmpty()) return emptyList()
return queryFactory
.selectFrom(pushToken)
.where(pushToken.member.id.`in`(memberIds))
.fetch()
}
}