콘텐츠 댓글 조회 수정

- 콘텐츠 크리에이터 - 댓글 전체 조회
- 일반 유저 - 공개 댓글 + 내가 쓴 댓글
This commit is contained in:
2024-08-29 23:40:44 +09:00
parent 45e8b0d155
commit 93410af224
9 changed files with 101 additions and 31 deletions

View File

@@ -492,6 +492,8 @@ class AudioContentService(
commentRepository.findByContentId(
cloudFrontHost = coverImageHost,
contentId = audioContent.id!!,
memberId = member.id!!,
isContentCreator = creatorId == member.id!!,
timezone = timezone,
offset = 0,
limit = 1
@@ -502,7 +504,11 @@ class AudioContentService(
// 댓글 수
val commentCount = if (audioContent.isCommentAvailable) {
commentRepository.totalCountCommentByContentId(contentId = audioContent.id!!)
commentRepository.totalCountCommentByContentId(
contentId = audioContent.id!!,
memberId = member.id!!,
isContentCreator = creatorId == member.id!!
)
} else {
0
}
@@ -666,7 +672,11 @@ class AudioContentService(
val items = audioContentList
.map {
val commentCount = commentRepository
.totalCountCommentByContentId(it.contentId)
.totalCountCommentByContentId(
it.contentId,
memberId = member.id!!,
isContentCreator = creatorId == member.id!!
)
it.commentCount = commentCount
val likeCount = audioContentLikeRepository