| @@ -29,7 +29,6 @@ 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) | ||||
| @@ -51,7 +50,12 @@ 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) | ||||
| @@ -116,6 +120,7 @@ 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, | ||||
| @@ -126,6 +131,7 @@ class AudioContentMainService( | ||||
|             .toList() | ||||
|     } | ||||
|  | ||||
|     @Cacheable(cacheNames = ["default"], key = "'contentMainBannerList:' + #memberId + ':' + #isAdult") | ||||
|     fun getAudioContentMainBannerList(memberId: Long, isAdult: Boolean) = | ||||
|         repository.getAudioContentMainBannerList(isAdult = isAdult) | ||||
|             .asSequence() | ||||
| @@ -174,6 +180,7 @@ class AudioContentMainService( | ||||
|             } | ||||
|             .toList() | ||||
|  | ||||
|     @Cacheable(cacheNames = ["default"], key = "'contentCurationList:' + #memberId + ':' + #isAdult") | ||||
|     fun getAudioContentCurationList(memberId: Long, isAdult: Boolean) = | ||||
|         repository.getAudioContentCurations(isAdult = isAdult) | ||||
|             .asSequence() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user