From 0c153aeb6a6742f7e5d02de7474f84bc1e387f80 Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 20 Sep 2024 01:10:29 +0900 Subject: [PATCH] =?UTF-8?q?=ED=81=AC=EB=A6=AC=EC=97=90=EC=9D=B4=ED=84=B0?= =?UTF-8?q?=20=EB=82=B4=20=EC=B1=84=EB=84=90=20-=20=ED=8C=94=EB=A1=9C?= =?UTF-8?q?=EC=9B=8C=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20-=20=EC=95=8C?= =?UTF-8?q?=EB=A6=BC=EC=84=A4=EC=A0=95=20=EC=97=AC=EB=B6=80=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/vividnext/sodalive/explorer/ExplorerService.kt | 10 +++++++--- .../explorer/follower/GetFollowerListResponse.kt | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt index 7ec998c..4a905dd 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/ExplorerService.kt @@ -307,8 +307,11 @@ class ExplorerService( val followerList = queryRepository.getFollowerList(creatorId, pageable.offset, pageable.pageSize.toLong()) .map { - val isFollow = if (it.role == MemberRole.CREATOR) { - queryRepository.isFollow(creatorId = it.userId, memberId = member.id!!) + val creatorFollowing = if (it.role == MemberRole.CREATOR) { + queryRepository.getCreatorFollowing( + creatorId = it.userId, + memberId = member.id!! + ) } else { null } @@ -317,7 +320,8 @@ class ExplorerService( userId = it.userId, profileImage = it.profileImage, nickname = it.nickname, - isFollow = isFollow + isFollow = creatorFollowing?.isFollow ?: false, + isNotify = creatorFollowing?.isNotify ?: false ) } diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt index d7ef0ec..caa46e5 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/explorer/follower/GetFollowerListResponse.kt @@ -9,5 +9,6 @@ data class GetFollowerListResponseItem( val userId: Long, val profileImage: String, val nickname: String, - val isFollow: Boolean? + val isFollow: Boolean?, + val isNotify: Boolean? )