Compare commits
No commits in common. "16328f73d9c28559a1c5b4ff8f997f584d38cea9" and "e0d4f53cf4d2486049ad0eabb95b73acc4e9cf62" have entirely different histories.
16328f73d9
...
e0d4f53cf4
|
@ -129,7 +129,6 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
|
||||||
QGetCalculateContentDonationQueryData(
|
QGetCalculateContentDonationQueryData(
|
||||||
member.nickname,
|
member.nickname,
|
||||||
audioContent.title,
|
audioContent.title,
|
||||||
audioContent.price,
|
|
||||||
getFormattedDate(audioContent.createdAt),
|
getFormattedDate(audioContent.createdAt),
|
||||||
donationFormattedDate,
|
donationFormattedDate,
|
||||||
useCan.id.count(),
|
useCan.id.count(),
|
||||||
|
|
|
@ -195,7 +195,7 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
@Cacheable(
|
@Cacheable(
|
||||||
cacheNames = ["cache_ttl_3_hours"],
|
cacheNames = ["cache_ttl_3_hours"],
|
||||||
key = "'calculateContentDonationList2:' + " + "#startDateStr + ':' + #endDateStr"
|
key = "'calculateContentDonationList:' + " + "#startDateStr + ':' + #endDateStr"
|
||||||
)
|
)
|
||||||
fun getCalculateContentDonationList(
|
fun getCalculateContentDonationList(
|
||||||
startDateStr: String,
|
startDateStr: String,
|
||||||
|
@ -222,14 +222,8 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||||
// 결제수수료 : 6.6%
|
// 결제수수료 : 6.6%
|
||||||
val paymentFee = totalKrw * 0.066f
|
val paymentFee = totalKrw * 0.066f
|
||||||
|
|
||||||
// 정산금액
|
// 정산금액 = (원화 - 결제수수료) 의 70%
|
||||||
// 유료콘텐츠 (원화 - 결제수수료) 의 90%
|
val settlementAmount = (totalKrw.toFloat() - paymentFee) * 0.7
|
||||||
// 무료콘텐츠 (원화 - 결제수수료) 의 70%
|
|
||||||
val settlementAmount = if (it.price > 0) {
|
|
||||||
(totalKrw.toFloat() - paymentFee) * 0.9
|
|
||||||
} else {
|
|
||||||
(totalKrw.toFloat() - paymentFee) * 0.7
|
|
||||||
}
|
|
||||||
|
|
||||||
// 원천세 = 정산금액의 3.3%
|
// 원천세 = 정산금액의 3.3%
|
||||||
val tax = settlementAmount * 0.033
|
val tax = settlementAmount * 0.033
|
||||||
|
@ -240,11 +234,6 @@ class AdminCalculateService(private val repository: AdminCalculateQueryRepositor
|
||||||
GetCalculateContentDonationResponse(
|
GetCalculateContentDonationResponse(
|
||||||
nickname = it.nickname,
|
nickname = it.nickname,
|
||||||
title = it.title,
|
title = it.title,
|
||||||
paidOrFree = if (it.price > 0) {
|
|
||||||
"유료"
|
|
||||||
} else {
|
|
||||||
"무료"
|
|
||||||
},
|
|
||||||
registrationDate = it.registrationDate,
|
registrationDate = it.registrationDate,
|
||||||
donationDate = it.donationDate,
|
donationDate = it.donationDate,
|
||||||
numberOfDonation = it.numberOfDonation.toInt(),
|
numberOfDonation = it.numberOfDonation.toInt(),
|
||||||
|
|
|
@ -7,8 +7,6 @@ data class GetCalculateContentDonationQueryData @QueryProjection constructor(
|
||||||
val nickname: String,
|
val nickname: String,
|
||||||
// 콘텐츠 제목
|
// 콘텐츠 제목
|
||||||
val title: String,
|
val title: String,
|
||||||
// 콘텐츠 가격
|
|
||||||
val price: Int,
|
|
||||||
// 콘텐츠 등록 날짜
|
// 콘텐츠 등록 날짜
|
||||||
val registrationDate: String,
|
val registrationDate: String,
|
||||||
// 후원 날짜
|
// 후원 날짜
|
||||||
|
|
|
@ -5,7 +5,6 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||||
data class GetCalculateContentDonationResponse(
|
data class GetCalculateContentDonationResponse(
|
||||||
@JsonProperty("nickname") val nickname: String,
|
@JsonProperty("nickname") val nickname: String,
|
||||||
@JsonProperty("title") val title: String,
|
@JsonProperty("title") val title: String,
|
||||||
@JsonProperty("paidOrFree") val paidOrFree: String,
|
|
||||||
@JsonProperty("registrationDate") val registrationDate: String,
|
@JsonProperty("registrationDate") val registrationDate: String,
|
||||||
@JsonProperty("donationDate") val donationDate: String,
|
@JsonProperty("donationDate") val donationDate: String,
|
||||||
@JsonProperty("numberOfDonation") val numberOfDonation: Int,
|
@JsonProperty("numberOfDonation") val numberOfDonation: Int,
|
||||||
|
|
|
@ -224,7 +224,6 @@ class CreatorAdminCalculateQueryRepository(private val queryFactory: JPAQueryFac
|
||||||
QGetCalculateContentDonationQueryData(
|
QGetCalculateContentDonationQueryData(
|
||||||
member.nickname,
|
member.nickname,
|
||||||
audioContent.title,
|
audioContent.title,
|
||||||
audioContent.price,
|
|
||||||
getFormattedDate(audioContent.createdAt),
|
getFormattedDate(audioContent.createdAt),
|
||||||
donationFormattedDate,
|
donationFormattedDate,
|
||||||
useCan.id.count(),
|
useCan.id.count(),
|
||||||
|
|
|
@ -210,7 +210,7 @@ class CreatorAdminCalculateService(private val repository: CreatorAdminCalculate
|
||||||
@Transactional(readOnly = true)
|
@Transactional(readOnly = true)
|
||||||
@Cacheable(
|
@Cacheable(
|
||||||
cacheNames = ["cache_ttl_3_hours"],
|
cacheNames = ["cache_ttl_3_hours"],
|
||||||
key = "'creatorCalculateContentDonationList2:' + " +
|
key = "'creatorCalculateContentDonationList:' + " +
|
||||||
"#startDateStr + ':' + #endDateStr + ':' + #memberId + ':' + #offset + ':' + #limit"
|
"#startDateStr + ':' + #endDateStr + ':' + #memberId + ':' + #offset + ':' + #limit"
|
||||||
)
|
)
|
||||||
fun getCalculateContentDonationList(
|
fun getCalculateContentDonationList(
|
||||||
|
@ -242,14 +242,8 @@ class CreatorAdminCalculateService(private val repository: CreatorAdminCalculate
|
||||||
// 결제수수료 : 6.6%
|
// 결제수수료 : 6.6%
|
||||||
val paymentFee = totalKrw * 0.066f
|
val paymentFee = totalKrw * 0.066f
|
||||||
|
|
||||||
// 정산금액
|
// 정산금액 = (원화 - 결제수수료) 의 70%
|
||||||
// 유료콘텐츠 (원화 - 결제수수료) 의 90%
|
val settlementAmount = (totalKrw.toFloat() - paymentFee) * 0.7
|
||||||
// 무료콘텐츠 (원화 - 결제수수료) 의 70%
|
|
||||||
val settlementAmount = if (it.price > 0) {
|
|
||||||
(totalKrw.toFloat() - paymentFee) * 0.9
|
|
||||||
} else {
|
|
||||||
(totalKrw.toFloat() - paymentFee) * 0.7
|
|
||||||
}
|
|
||||||
|
|
||||||
// 원천세 = 정산금액의 3.3%
|
// 원천세 = 정산금액의 3.3%
|
||||||
val tax = settlementAmount * 0.033
|
val tax = settlementAmount * 0.033
|
||||||
|
@ -260,11 +254,6 @@ class CreatorAdminCalculateService(private val repository: CreatorAdminCalculate
|
||||||
GetCalculateContentDonationResponse(
|
GetCalculateContentDonationResponse(
|
||||||
nickname = it.nickname,
|
nickname = it.nickname,
|
||||||
title = it.title,
|
title = it.title,
|
||||||
paidOrFree = if (it.price > 0) {
|
|
||||||
"유료"
|
|
||||||
} else {
|
|
||||||
"무료"
|
|
||||||
},
|
|
||||||
registrationDate = it.registrationDate,
|
registrationDate = it.registrationDate,
|
||||||
donationDate = it.donationDate,
|
donationDate = it.donationDate,
|
||||||
numberOfDonation = it.numberOfDonation.toInt(),
|
numberOfDonation = it.numberOfDonation.toInt(),
|
||||||
|
|
Loading…
Reference in New Issue