Compare commits

..

No commits in common. "03586c40059270744ef6f61005afd880eeb0c6e9" and "6ea69e15106e31e7302e1b0d2ba367af1524d2c2" have entirely different histories.

1 changed files with 24 additions and 6 deletions

View File

@ -28,6 +28,17 @@ class AudioContentMainService(
@Cacheable(cacheNames = ["default"], key = "'themeList:' + ':' + #isAdult")
fun getThemeList(isAdult: Boolean): List<String> {
return audioContentThemeRepository.getActiveThemeOfContent(isAdult = isAdult)
.filter {
it != "오디오북" &&
it != "모닝콜" &&
it != "알람" &&
it != "슬립콜" &&
it != "다시듣기" &&
it != "ASMR" &&
it != "릴레이" &&
it != "챌린지" &&
it != "자기소개"
}
}
@Transactional(readOnly = true)
@ -40,11 +51,7 @@ class AudioContentMainService(
): List<GetAudioContentMainItem> {
return repository.findByTheme(
memberId = member.id!!,
theme = if (theme.isNotBlank()) {
listOf(theme)
} else {
emptyList()
},
theme = listOf(theme),
isAdult = member.auth != null && isAdultContentVisible,
contentType = contentType,
offset = pageable.offset,
@ -62,8 +69,19 @@ class AudioContentMainService(
pageable: Pageable
): GetNewContentAllResponse {
val isAdult = member.auth != null && isAdultContentVisible
val themeList = if (theme.isBlank() || theme.trim() == "전체") {
val themeList = if (theme.isBlank()) {
audioContentThemeRepository.getActiveThemeOfContent(isAdult = isAdult)
.filter {
it != "오디오북" &&
it != "모닝콜" &&
it != "알람" &&
it != "슬립콜" &&
it != "다시듣기" &&
it != "ASMR" &&
it != "릴레이" &&
it != "챌린지" &&
it != "자기소개"
}
} else {
listOf(theme)
}