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