Compare commits
No commits in common. "545836d43cd08c577b6fa4c9a68aa56687b5223d" and "219f83dec06c93f345ef1daae7f3e9031862f391" have entirely different histories.
545836d43c
...
219f83dec0
|
@ -61,7 +61,12 @@ class AdminMemberStatisticsRepository(private val queryFactory: JPAQueryFactory)
|
||||||
.sumOf { it.memberCount }
|
.sumOf { it.memberCount }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSignUpCountInRange(startDate: LocalDateTime, endDate: LocalDateTime): List<DateAndMemberCount> {
|
fun getSignUpCountInRange(
|
||||||
|
startDate: LocalDateTime,
|
||||||
|
endDate: LocalDateTime,
|
||||||
|
offset: Long,
|
||||||
|
limit: Long
|
||||||
|
): List<DateAndMemberCount> {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
QDateAndMemberCount(
|
QDateAndMemberCount(
|
||||||
|
@ -76,10 +81,17 @@ class AdminMemberStatisticsRepository(private val queryFactory: JPAQueryFactory)
|
||||||
)
|
)
|
||||||
.groupBy(getFormattedDate(member.createdAt))
|
.groupBy(getFormattedDate(member.createdAt))
|
||||||
.orderBy(getFormattedDate(member.createdAt).desc())
|
.orderBy(getFormattedDate(member.createdAt).desc())
|
||||||
|
.offset(offset)
|
||||||
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSignOutCountInRange(startDate: LocalDateTime, endDate: LocalDateTime): List<DateAndMemberCount> {
|
fun getSignOutCountInRange(
|
||||||
|
startDate: LocalDateTime,
|
||||||
|
endDate: LocalDateTime,
|
||||||
|
offset: Long,
|
||||||
|
limit: Long
|
||||||
|
): List<DateAndMemberCount> {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
QDateAndMemberCount(
|
QDateAndMemberCount(
|
||||||
|
@ -94,10 +106,17 @@ class AdminMemberStatisticsRepository(private val queryFactory: JPAQueryFactory)
|
||||||
)
|
)
|
||||||
.groupBy(getFormattedDate(signOut.createdAt))
|
.groupBy(getFormattedDate(signOut.createdAt))
|
||||||
.orderBy(getFormattedDate(signOut.createdAt).desc())
|
.orderBy(getFormattedDate(signOut.createdAt).desc())
|
||||||
|
.offset(offset)
|
||||||
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPaymentMemberCountInRange(startDate: LocalDateTime, endDate: LocalDateTime): List<DateAndMemberCount> {
|
fun getPaymentMemberCountInRange(
|
||||||
|
startDate: LocalDateTime,
|
||||||
|
endDate: LocalDateTime,
|
||||||
|
offset: Long,
|
||||||
|
limit: Long
|
||||||
|
): List<DateAndMemberCount> {
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
QDateAndMemberCount(
|
QDateAndMemberCount(
|
||||||
|
@ -116,6 +135,8 @@ class AdminMemberStatisticsRepository(private val queryFactory: JPAQueryFactory)
|
||||||
)
|
)
|
||||||
.groupBy(getFormattedDate(charge.createdAt))
|
.groupBy(getFormattedDate(charge.createdAt))
|
||||||
.orderBy(getFormattedDate(charge.createdAt).desc())
|
.orderBy(getFormattedDate(charge.createdAt).desc())
|
||||||
|
.offset(offset)
|
||||||
|
.limit(limit)
|
||||||
.fetch()
|
.fetch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,17 +61,23 @@ class AdminMemberStatisticsService(private val repository: AdminMemberStatistics
|
||||||
|
|
||||||
val signUpCountInRange = repository.getSignUpCountInRange(
|
val signUpCountInRange = repository.getSignUpCountInRange(
|
||||||
startDate = startDateTime,
|
startDate = startDateTime,
|
||||||
endDate = endDateTime
|
endDate = endDateTime,
|
||||||
|
offset = pageable.offset,
|
||||||
|
limit = pageable.pageSize.toLong()
|
||||||
).associateBy({ it.date }, { it.memberCount })
|
).associateBy({ it.date }, { it.memberCount })
|
||||||
|
|
||||||
val signOutCountInRange = repository.getSignOutCountInRange(
|
val signOutCountInRange = repository.getSignOutCountInRange(
|
||||||
startDate = startDateTime,
|
startDate = startDateTime,
|
||||||
endDate = endDateTime
|
endDate = endDateTime,
|
||||||
|
offset = pageable.offset,
|
||||||
|
limit = pageable.pageSize.toLong()
|
||||||
).associateBy({ it.date }, { it.memberCount })
|
).associateBy({ it.date }, { it.memberCount })
|
||||||
|
|
||||||
val paymentMemberCountInRange = repository.getPaymentMemberCountInRange(
|
val paymentMemberCountInRange = repository.getPaymentMemberCountInRange(
|
||||||
startDate = startDateTime,
|
startDate = startDateTime,
|
||||||
endDate = endDateTime
|
endDate = endDateTime,
|
||||||
|
offset = pageable.offset,
|
||||||
|
limit = pageable.pageSize.toLong()
|
||||||
)
|
)
|
||||||
|
|
||||||
val paymentMemberCountInRangeMap = paymentMemberCountInRange.associateBy({ it.date }, { it.memberCount })
|
val paymentMemberCountInRangeMap = paymentMemberCountInRange.associateBy({ it.date }, { it.memberCount })
|
||||||
|
|
Loading…
Reference in New Issue