| @@ -29,7 +29,6 @@ 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) | ||||||
| @@ -51,7 +50,12 @@ class AudioContentMainService( | |||||||
|             isAdult = isAdult |             isAdult = isAdult | ||||||
|         ) |         ) | ||||||
|             .asSequence() |             .asSequence() | ||||||
|             .filter { !blockMemberRepository.isBlocked(blockedMemberId = memberId, memberId = it.creatorId) } |             .filter { | ||||||
|  |                 !blockMemberRepository.isBlocked( | ||||||
|  |                     blockedMemberId = memberId, | ||||||
|  |                     memberId = it.creatorId | ||||||
|  |                 ) | ||||||
|  |             } | ||||||
|             .toList() |             .toList() | ||||||
|  |  | ||||||
|         val curationList = getAudioContentCurationList(memberId = memberId, isAdult = isAdult) |         val curationList = getAudioContentCurationList(memberId = memberId, isAdult = isAdult) | ||||||
| @@ -116,6 +120,7 @@ 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, | ||||||
| @@ -126,6 +131,7 @@ 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() | ||||||
| @@ -174,6 +180,7 @@ 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() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user