Compare commits
No commits in common. "72cb90357e56927ac5be96329de040d7796ed16b" and "f503492bf9537decc8a8cb3485f113440cd2e0d3" have entirely different histories.
72cb90357e
...
f503492bf9
|
@ -802,7 +802,6 @@ class AudioContentQueryRepositoryImpl(
|
|||
)
|
||||
.from(audioContent)
|
||||
.innerJoin(audioContent.theme, audioContentTheme)
|
||||
.where(audioContent.id.`in`(contentIdList))
|
||||
.fetch()
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ class AudioContentPlaylistService(
|
|||
}
|
||||
|
||||
// 콘텐츠 유효성 검사 (소장으로 구매한 콘텐츠 인가?)
|
||||
validateContent(
|
||||
checkOrderedContent(
|
||||
contentIdList = request.contentIdAndOrderList.map { it.contentId },
|
||||
memberId = member.id!!
|
||||
)
|
||||
|
@ -44,17 +44,6 @@ class AudioContentPlaylistService(
|
|||
redisRepository.save(playlist)
|
||||
}
|
||||
|
||||
private fun validateContent(contentIdList: List<Long>, memberId: Long) {
|
||||
if (contentIdList.isEmpty()) {
|
||||
throw SodaException("콘텐츠를 1개 이상 추가하세요")
|
||||
}
|
||||
|
||||
checkOrderedContent(
|
||||
contentIdList = contentIdList,
|
||||
memberId = memberId
|
||||
)
|
||||
}
|
||||
|
||||
private fun checkOrderedContent(contentIdList: List<Long>, memberId: Long) {
|
||||
val orderedContentIdList = orderRepository.findOrderedContent(contentIdList, memberId).toSet()
|
||||
val orderedContentMap = contentIdList.associateWith { it in orderedContentIdList }
|
||||
|
|
Loading…
Reference in New Issue