feat(home): 포인트 사용 가능 콘텐츠 리스트 추가
This commit is contained in:
@@ -184,7 +184,8 @@ interface AudioContentQueryRepository {
|
||||
limit: Long,
|
||||
isFree: Boolean,
|
||||
isAdult: Boolean,
|
||||
orderByRandom: Boolean = false
|
||||
orderByRandom: Boolean = false,
|
||||
isPointAvailableOnly: Boolean = false
|
||||
): List<AudioContentMainItem>
|
||||
|
||||
fun findContentByCurationId(
|
||||
@@ -1310,7 +1311,8 @@ class AudioContentQueryRepositoryImpl(
|
||||
limit: Long,
|
||||
isFree: Boolean,
|
||||
isAdult: Boolean,
|
||||
orderByRandom: Boolean
|
||||
orderByRandom: Boolean,
|
||||
isPointAvailableOnly: Boolean
|
||||
): List<AudioContentMainItem> {
|
||||
var where = audioContent.isActive.isTrue
|
||||
.and(audioContent.duration.isNotNull)
|
||||
@@ -1345,6 +1347,10 @@ class AudioContentQueryRepositoryImpl(
|
||||
where = where.and(audioContent.price.loe(0))
|
||||
}
|
||||
|
||||
if (isPointAvailableOnly) {
|
||||
where = where.and(audioContent.isPointAvailable.isTrue)
|
||||
}
|
||||
|
||||
val orderBy = if (orderByRandom) {
|
||||
Expressions.numberTemplate(Double::class.java, "function('rand')").asc()
|
||||
} else {
|
||||
|
||||
@@ -990,7 +990,8 @@ class AudioContentService(
|
||||
limit: Long = 20,
|
||||
isFree: Boolean = false,
|
||||
isAdult: Boolean = false,
|
||||
orderByRandom: Boolean = false
|
||||
orderByRandom: Boolean = false,
|
||||
isPointAvailableOnly: Boolean = false
|
||||
): List<AudioContentMainItem> {
|
||||
return repository.getLatestContentByTheme(
|
||||
theme = theme,
|
||||
@@ -999,7 +1000,8 @@ class AudioContentService(
|
||||
limit = limit,
|
||||
isFree = isFree,
|
||||
isAdult = isAdult,
|
||||
orderByRandom = orderByRandom
|
||||
orderByRandom = orderByRandom,
|
||||
isPointAvailableOnly = isPointAvailableOnly
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user