parent
84de4e0c5a
commit
5b3c5731ee
|
@ -35,6 +35,12 @@ class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
|
|||
.otherwise(0)
|
||||
.sum()
|
||||
|
||||
val loginCount = CaseBuilder()
|
||||
.`when`(adTrackingHistory.id.type.eq(AdTrackingHistoryType.LOGIN))
|
||||
.then(1)
|
||||
.otherwise(0)
|
||||
.sum()
|
||||
|
||||
val firstPaymentCount = CaseBuilder()
|
||||
.`when`(adTrackingHistory.id.type.eq(AdTrackingHistoryType.FIRST_PAYMENT))
|
||||
.then(1)
|
||||
|
@ -84,6 +90,7 @@ class AdminAdStatisticsRepository(private val queryFactory: JPAQueryFactory) {
|
|||
adTrackingHistory.mediaGroup,
|
||||
adTrackingHistory.id.pid,
|
||||
adTrackingHistory.pidName,
|
||||
loginCount,
|
||||
signUpCount,
|
||||
firstPaymentCount,
|
||||
roundedValueDecimalPlaces2(firstPaymentTotalAmount),
|
||||
|
|
|
@ -12,6 +12,7 @@ data class GetAdminAdStatisticsItem @QueryProjection constructor(
|
|||
val mediaGroup: String,
|
||||
val pid: String,
|
||||
val pidName: String,
|
||||
val loginCount: Int,
|
||||
val signUpCount: Int,
|
||||
val firstPaymentCount: Int,
|
||||
val firstPaymentTotalAmount: Double,
|
||||
|
|
Loading…
Reference in New Issue