콘텐츠 리스트
- 대여/소장/매진 여부 추가
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user