fix(home-following): 최근 대화를 팔로우 크리에이터로 제한한다
This commit is contained in:
@@ -87,6 +87,15 @@ interface ChatRoomRepository : JpaRepository<ChatRoom, Long> {
|
||||
AND pc.isActive = true
|
||||
AND r.isActive = true
|
||||
AND m.isActive = true
|
||||
AND (
|
||||
:followedCreatorsOnly = false
|
||||
OR EXISTS (
|
||||
SELECT cf.id FROM CreatorFollowing cf
|
||||
WHERE cf.member.id = :memberId
|
||||
AND cf.creator.id = pc.character.creatorMember.id
|
||||
AND cf.isActive = true
|
||||
)
|
||||
)
|
||||
AND (
|
||||
:cursorAt IS NULL
|
||||
OR m.createdAt < :cursorAt
|
||||
@@ -110,6 +119,7 @@ interface ChatRoomRepository : JpaRepository<ChatRoom, Long> {
|
||||
@Param("cursorAt") cursorAt: LocalDateTime?,
|
||||
@Param("cursorChatType") cursorChatType: String?,
|
||||
@Param("cursorRoomId") cursorRoomId: Long?,
|
||||
@Param("followedCreatorsOnly") followedCreatorsOnly: Boolean,
|
||||
pageable: Pageable
|
||||
): List<V2ChatRoomListQueryDto>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user