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