콘텐츠 리스트

- 대여/소장/매진 여부 추가
This commit is contained in:
2024-05-30 14:05:36 +09:00
parent 4cee0e3585
commit a529f05825
3 changed files with 22 additions and 4 deletions

View File

@@ -666,12 +666,24 @@ class AudioContentService(
.map {
val commentCount = commentRepository
.totalCountCommentByContentId(it.contentId)
it.commentCount = commentCount
val likeCount = audioContentLikeRepository
.totalCountAudioContentLike(it.contentId)
it.likeCount = likeCount
it.commentCount = commentCount
val (isExistsAudioContent, orderType) = orderRepository.isExistOrderedAndOrderType(
memberId = member.id!!,
contentId = it.contentId
)
if (isExistsAudioContent) {
if (orderType == OrderType.RENTAL) {
it.isRented = true
} else {
it.isOwned = true
}
}
it
}