test #284
|
@ -14,9 +14,8 @@ import java.time.LocalDateTime
|
||||||
@Repository
|
@Repository
|
||||||
class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
|
class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
|
||||||
fun getAdStatisticsDataTotalCount(): Int {
|
fun getAdStatisticsDataTotalCount(): Int {
|
||||||
return (
|
return queryFactory
|
||||||
queryFactory
|
.select(adTrackingHistory.id.pid)
|
||||||
.select(adTrackingHistory.id.pid.count())
|
|
||||||
.from(adTrackingHistory)
|
.from(adTrackingHistory)
|
||||||
.groupBy(
|
.groupBy(
|
||||||
getFormattedDate(adTrackingHistory.id.createdAt),
|
getFormattedDate(adTrackingHistory.id.createdAt),
|
||||||
|
@ -24,8 +23,8 @@ class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
|
||||||
adTrackingHistory.id.pid,
|
adTrackingHistory.id.pid,
|
||||||
adTrackingHistory.pidName
|
adTrackingHistory.pidName
|
||||||
)
|
)
|
||||||
.fetchOne() ?: 0L
|
.fetch()
|
||||||
).toInt()
|
.size
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAdStatisticsDataList(
|
fun getAdStatisticsDataList(
|
||||||
|
|
|
@ -410,8 +410,10 @@ class AudioContentQueryRepositoryImpl(
|
||||||
where = where.and(audioContentTheme.theme.`in`(theme))
|
where = where.and(audioContentTheme.theme.`in`(theme))
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFree) {
|
where = if (isFree) {
|
||||||
where = where.and(audioContent.price.loe(0))
|
where.and(audioContent.price.loe(0))
|
||||||
|
} else {
|
||||||
|
where.and(audioContent.price.gt(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|
|
@ -35,8 +35,10 @@ class AudioContentThemeQueryRepository(
|
||||||
where = where.and(audioContent.isAdult.isFalse)
|
where = where.and(audioContent.isAdult.isFalse)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isFree) {
|
where = if (isFree) {
|
||||||
where = where.and(audioContent.price.loe(0))
|
where.and(audioContent.price.loe(0))
|
||||||
|
} else {
|
||||||
|
where.and(audioContent.price.gt(0))
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|
Loading…
Reference in New Issue