Compare commits

..

No commits in common. "724d7a9d9bf3fda811f12b69391890aead16169d" and "2da3b0db780bee21cfd23a14412cb3775304c64a" have entirely different histories.

1 changed files with 2 additions and 9 deletions

View File

@ -29,6 +29,7 @@ class AudioContentMainService(
@Value("\${cloud.aws.cloud-front.host}")
private val imageHost: String
) {
@Cacheable(cacheNames = ["default"], key = "'contentMain:' + #memberId + ':' + #isAdult")
fun getMain(memberId: Long, isAdult: Boolean): GetAudioContentMainResponse {
// 2주일 이내에 콘텐츠를 올린 크리에이터 20명 조회
val newContentUploadCreatorList = getNewContentUploadCreatorList(memberId = memberId, isAdult = isAdult)
@ -50,12 +51,7 @@ class AudioContentMainService(
isAdult = isAdult
)
.asSequence()
.filter {
!blockMemberRepository.isBlocked(
blockedMemberId = memberId,
memberId = it.creatorId
)
}
.filter { !blockMemberRepository.isBlocked(blockedMemberId = memberId, memberId = it.creatorId) }
.toList()
val curationList = getAudioContentCurationList(memberId = memberId, isAdult = isAdult)
@ -120,7 +116,6 @@ class AudioContentMainService(
return GetNewContentAllResponse(totalCount, items)
}
@Cacheable(cacheNames = ["default"], key = "'newContentUploadCreatorList:' + #memberId + ':' + #isAdult")
fun getNewContentUploadCreatorList(memberId: Long, isAdult: Boolean): List<GetNewContentUploadCreator> {
return repository.getNewContentUploadCreatorList(
cloudfrontHost = imageHost,
@ -131,7 +126,6 @@ class AudioContentMainService(
.toList()
}
@Cacheable(cacheNames = ["default"], key = "'contentMainBannerList:' + #memberId + ':' + #isAdult")
fun getAudioContentMainBannerList(memberId: Long, isAdult: Boolean) =
repository.getAudioContentMainBannerList(isAdult = isAdult)
.asSequence()
@ -180,7 +174,6 @@ class AudioContentMainService(
}
.toList()
@Cacheable(cacheNames = ["default"], key = "'contentCurationList:' + #memberId + ':' + #isAdult")
fun getAudioContentCurationList(memberId: Long, isAdult: Boolean) =
repository.getAudioContentCurations(isAdult = isAdult)
.asSequence()