Compare commits

...

2 Commits

Author SHA1 Message Date
klaus a2b39466c2 Merge pull request '기존 콘텐츠 메인 - 새로운 콘텐츠' (#265) from test into main
Reviewed-on: #265
2025-02-19 11:34:02 +00:00
Klaus 3388bb4283 기존 콘텐츠 메인 - 새로운 콘텐츠
- 전체 테마를 선택시 데이터가 나오지 않는 버그 수정
2025-02-19 19:12:11 +09:00
1 changed files with 23 additions and 1 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)
@ -62,8 +73,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)
}