Compare commits

...

2 Commits

Author SHA1 Message Date
Klaus 41be05093d 콘텐츠 상세
- 콘텐츠 URL, 오픈예정 날짜 로직 조건 수정
2024-01-09 23:24:21 +09:00
Klaus 40f4a12f9b 사용하지 않는 함수 제거 2024-01-09 23:09:56 +09:00
2 changed files with 4 additions and 29 deletions

View File

@ -440,7 +440,7 @@ class AudioContentService(
val releaseDate = if ( val releaseDate = if (
audioContent.releaseDate != null && audioContent.releaseDate != null &&
audioContent.releaseDate!! < LocalDateTime.now() && audioContent.releaseDate!! >= LocalDateTime.now() &&
creatorId != member.id!! creatorId != member.id!!
) { ) {
audioContent.releaseDate!! audioContent.releaseDate!!
@ -453,9 +453,9 @@ class AudioContentService(
} }
val audioContentUrl = if ( val audioContentUrl = if (
audioContent.releaseDate != null && audioContent.releaseDate == null ||
audioContent.releaseDate!! < LocalDateTime.now() && audioContent.releaseDate!! <= LocalDateTime.now() ||
creatorId != member.id!! creatorId == member.id!!
) { ) {
audioContentCloudFront.generateSignedURL( audioContentCloudFront.generateSignedURL(
resourcePath = if ( resourcePath = if (

View File

@ -122,31 +122,6 @@ class AudioContentMainService(
} }
.toList() .toList()
@Transactional(readOnly = true)
@Cacheable(cacheNames = ["default"], key = "'contentCurationList:' + #memberId + ':' + #isAdult")
fun getAudioContentCurationList(memberId: Long, isAdult: Boolean) =
repository.getAudioContentCurations(isAdult = isAdult)
.asSequence()
.map {
GetAudioContentCurationResponse(
curationId = it.id!!,
title = it.title,
description = it.description,
contents = repository.findAudioContentByCurationId(
curationId = it.id!!,
cloudfrontHost = imageHost,
isAdult = isAdult
)
.asSequence()
.filter { content ->
!blockMemberRepository.isBlocked(blockedMemberId = memberId, memberId = content.creatorId)
}
.toList()
)
}
.filter { it.contents.isNotEmpty() }
.toList()
@Transactional(readOnly = true) @Transactional(readOnly = true)
@Cacheable( @Cacheable(
cacheNames = ["default"], cacheNames = ["default"],