Compare commits

..

No commits in common. "8fffad9d3acab6ecd1439cd13468e4355a6f63f6" and "f4f0f203a25d54caa5550307894d72d3062e9159" have entirely different histories.

3 changed files with 16 additions and 19 deletions

View File

@ -14,8 +14,9 @@ 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
.select(adTrackingHistory.id.pid.count())
.from(adTrackingHistory) .from(adTrackingHistory)
.groupBy( .groupBy(
getFormattedDate(adTrackingHistory.id.createdAt), getFormattedDate(adTrackingHistory.id.createdAt),
@ -23,8 +24,8 @@ class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
adTrackingHistory.id.pid, adTrackingHistory.id.pid,
adTrackingHistory.pidName adTrackingHistory.pidName
) )
.fetch() .fetchOne() ?: 0L
.size ).toInt()
} }
fun getAdStatisticsDataList( fun getAdStatisticsDataList(

View File

@ -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

View File

@ -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