fix(latest-content): 최신 콘텐츠 전체보기에서 유/무료 모두 조회되도록 수정

This commit is contained in:
2025-11-18 19:21:15 +09:00
parent bc358d18de
commit 690432d6ee
3 changed files with 1 additions and 28 deletions

View File

@@ -109,7 +109,6 @@ interface AudioContentQueryRepository {
): Int ): Int
fun findByThemeFor2Weeks( fun findByThemeFor2Weeks(
isFree: Boolean = false,
cloudfrontHost: String, cloudfrontHost: String,
memberId: Long, memberId: Long,
theme: List<String> = emptyList(), theme: List<String> = emptyList(),
@@ -120,7 +119,6 @@ interface AudioContentQueryRepository {
): List<GetAudioContentMainItem> ): List<GetAudioContentMainItem>
fun totalCountNewContentFor2Weeks( fun totalCountNewContentFor2Weeks(
isFree: Boolean = false,
theme: List<String> = emptyList(), theme: List<String> = emptyList(),
memberId: Long, memberId: Long,
isAdult: Boolean, isAdult: Boolean,
@@ -695,7 +693,6 @@ class AudioContentQueryRepositoryImpl(
} }
override fun totalCountNewContentFor2Weeks( override fun totalCountNewContentFor2Weeks(
isFree: Boolean,
theme: List<String>, theme: List<String>,
memberId: Long, memberId: Long,
isAdult: Boolean, isAdult: Boolean,
@@ -732,10 +729,6 @@ class AudioContentQueryRepositoryImpl(
where = where.and(audioContentTheme.theme.`in`(theme)) where = where.and(audioContentTheme.theme.`in`(theme))
} }
if (isFree) {
where = where.and(audioContent.price.loe(0))
}
return queryFactory return queryFactory
.select(audioContent.id) .select(audioContent.id)
.from(audioContent) .from(audioContent)
@@ -747,7 +740,6 @@ class AudioContentQueryRepositoryImpl(
} }
override fun findByThemeFor2Weeks( override fun findByThemeFor2Weeks(
isFree: Boolean,
cloudfrontHost: String, cloudfrontHost: String,
memberId: Long, memberId: Long,
theme: List<String>, theme: List<String>,
@@ -787,10 +779,6 @@ class AudioContentQueryRepositoryImpl(
where = where.and(audioContentTheme.theme.`in`(theme)) where = where.and(audioContentTheme.theme.`in`(theme))
} }
if (isFree) {
where = where.and(audioContent.price.loe(0))
}
return queryFactory return queryFactory
.select( .select(
QGetAudioContentMainItem( QGetAudioContentMainItem(

View File

@@ -99,7 +99,6 @@ class AudioContentMainController(
@GetMapping("/new/all") @GetMapping("/new/all")
fun getNewContentAllByTheme( fun getNewContentAllByTheme(
@RequestParam("isFree", required = false) isFree: Boolean? = null,
@RequestParam("theme") theme: String, @RequestParam("theme") theme: String,
@RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null, @RequestParam("isAdultContentVisible", required = false) isAdultContentVisible: Boolean? = null,
@RequestParam("contentType", required = false) contentType: ContentType? = null, @RequestParam("contentType", required = false) contentType: ContentType? = null,
@@ -110,7 +109,6 @@ class AudioContentMainController(
ApiResponse.ok( ApiResponse.ok(
service.getNewContentFor2WeeksByTheme( service.getNewContentFor2WeeksByTheme(
isFree = isFree ?: false,
theme = theme, theme = theme,
isAdultContentVisible = isAdultContentVisible ?: true, isAdultContentVisible = isAdultContentVisible ?: true,
contentType = contentType ?: ContentType.ALL, contentType = contentType ?: ContentType.ALL,

View File

@@ -54,7 +54,6 @@ class AudioContentMainService(
@Transactional(readOnly = true) @Transactional(readOnly = true)
fun getNewContentFor2WeeksByTheme( fun getNewContentFor2WeeksByTheme(
isFree: Boolean,
theme: String, theme: String,
isAdultContentVisible: Boolean, isAdultContentVisible: Boolean,
contentType: ContentType, contentType: ContentType,
@@ -65,31 +64,19 @@ class AudioContentMainService(
val themeList = if (theme.isBlank()) { val themeList = if (theme.isBlank()) {
audioContentThemeRepository.getActiveThemeOfContent( audioContentThemeRepository.getActiveThemeOfContent(
isAdult = isAdult, isAdult = isAdult,
isFree = isFree,
contentType = contentType contentType = contentType
).filter { )
it != "모닝콜" &&
it != "알람" &&
it != "슬립콜" &&
it != "다시듣기" &&
it != "ASMR" &&
it != "릴레이" &&
it != "챌린지" &&
it != "자기소개"
}
} else { } else {
listOf(theme) listOf(theme)
} }
val totalCount = repository.totalCountNewContentFor2Weeks( val totalCount = repository.totalCountNewContentFor2Weeks(
isFree,
themeList, themeList,
memberId = member.id!!, memberId = member.id!!,
isAdult = isAdult, isAdult = isAdult,
contentType = contentType contentType = contentType
) )
val items = repository.findByThemeFor2Weeks( val items = repository.findByThemeFor2Weeks(
isFree,
cloudfrontHost = imageHost, cloudfrontHost = imageHost,
memberId = member.id!!, memberId = member.id!!,
theme = themeList, theme = themeList,