Compare commits
No commits in common. "8fffad9d3acab6ecd1439cd13468e4355a6f63f6" and "f4f0f203a25d54caa5550307894d72d3062e9159" have entirely different histories.
8fffad9d3a
...
f4f0f203a2
|
@ -14,17 +14,18 @@ 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 queryFactory
|
return (
|
||||||
.select(adTrackingHistory.id.pid)
|
queryFactory
|
||||||
.from(adTrackingHistory)
|
.select(adTrackingHistory.id.pid.count())
|
||||||
.groupBy(
|
.from(adTrackingHistory)
|
||||||
getFormattedDate(adTrackingHistory.id.createdAt),
|
.groupBy(
|
||||||
adTrackingHistory.mediaGroup,
|
getFormattedDate(adTrackingHistory.id.createdAt),
|
||||||
adTrackingHistory.id.pid,
|
adTrackingHistory.mediaGroup,
|
||||||
adTrackingHistory.pidName
|
adTrackingHistory.id.pid,
|
||||||
)
|
adTrackingHistory.pidName
|
||||||
.fetch()
|
)
|
||||||
.size
|
.fetchOne() ?: 0L
|
||||||
|
).toInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAdStatisticsDataList(
|
fun getAdStatisticsDataList(
|
||||||
|
|
|
@ -410,10 +410,8 @@ class AudioContentQueryRepositoryImpl(
|
||||||
where = where.and(audioContentTheme.theme.`in`(theme))
|
where = where.and(audioContentTheme.theme.`in`(theme))
|
||||||
}
|
}
|
||||||
|
|
||||||
where = if (isFree) {
|
if (isFree) {
|
||||||
where.and(audioContent.price.loe(0))
|
where = where.and(audioContent.price.loe(0))
|
||||||
} else {
|
|
||||||
where.and(audioContent.price.gt(0))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|
|
@ -35,10 +35,8 @@ class AudioContentThemeQueryRepository(
|
||||||
where = where.and(audioContent.isAdult.isFalse)
|
where = where.and(audioContent.isAdult.isFalse)
|
||||||
}
|
}
|
||||||
|
|
||||||
where = if (isFree) {
|
if (isFree) {
|
||||||
where.and(audioContent.price.loe(0))
|
where = where.and(audioContent.price.loe(0))
|
||||||
} else {
|
|
||||||
where.and(audioContent.price.gt(0))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
|
|
Loading…
Reference in New Issue