fix(calculate): 관리자 정산 크리에이터 식별자를 보정한다
This commit is contained in:
@@ -391,7 +391,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
|
||||
return queryFactory
|
||||
.select(
|
||||
QGetCalculateByCreatorQueryData(
|
||||
member.email,
|
||||
member.id,
|
||||
member.nickname,
|
||||
useCan.can.add(useCan.rewardCan).sum(),
|
||||
creatorSettlementRatio.liveSettlementRatio
|
||||
@@ -447,7 +447,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
|
||||
return queryFactory
|
||||
.select(
|
||||
QGetCalculateByCreatorQueryData(
|
||||
member.email,
|
||||
member.id,
|
||||
member.nickname,
|
||||
order.can.sum(),
|
||||
creatorSettlementRatio.contentSettlementRatio
|
||||
@@ -504,7 +504,7 @@ class AdminCalculateQueryRepository(private val queryFactory: JPAQueryFactory) {
|
||||
return queryFactory
|
||||
.select(
|
||||
QGetCalculateByCreatorQueryData(
|
||||
member.email,
|
||||
member.id,
|
||||
member.nickname,
|
||||
useCan.can.add(useCan.rewardCan).sum(),
|
||||
creatorSettlementRatio.communitySettlementRatio
|
||||
|
||||
@@ -474,7 +474,7 @@ class AdminCalculateService(
|
||||
return createExcelStream(
|
||||
sheetName = sheetName,
|
||||
headers = listOf(
|
||||
"이메일",
|
||||
"크리에이터 번호",
|
||||
"닉네임",
|
||||
"총 캔",
|
||||
"원화",
|
||||
@@ -486,7 +486,7 @@ class AdminCalculateService(
|
||||
) { sheet ->
|
||||
items.forEachIndexed { index, item ->
|
||||
val row = sheet.createRow(index + 1)
|
||||
row.createCell(0).setCellValue(item.email)
|
||||
row.createCell(0).setCellValue(item.creatorId.toDouble())
|
||||
row.createCell(1).setCellValue(item.nickname)
|
||||
row.createCell(2).setCellValue(item.totalCan.toDouble())
|
||||
row.createCell(3).setCellValue(item.totalKrw.toDouble())
|
||||
|
||||
@@ -3,7 +3,7 @@ package kr.co.vividnext.sodalive.admin.calculate
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
data class GetCalculateByCreatorItem(
|
||||
@JsonProperty("email") val email: String,
|
||||
@JsonProperty("creatorId") val creatorId: Long,
|
||||
@JsonProperty("nickname") val nickname: String,
|
||||
@JsonProperty("totalCan") val totalCan: Int,
|
||||
@JsonProperty("totalKrw") val totalKrw: Int,
|
||||
|
||||
@@ -5,7 +5,7 @@ import java.math.BigDecimal
|
||||
import java.math.RoundingMode
|
||||
|
||||
data class GetCalculateByCreatorQueryData @QueryProjection constructor(
|
||||
val email: String,
|
||||
val creatorId: Long,
|
||||
val nickname: String,
|
||||
val totalCan: Int,
|
||||
val settlementRatio: Int?
|
||||
@@ -31,7 +31,7 @@ data class GetCalculateByCreatorQueryData @QueryProjection constructor(
|
||||
val depositAmount = settlementAmount.subtract(tax)
|
||||
|
||||
return GetCalculateByCreatorItem(
|
||||
email = email,
|
||||
creatorId = creatorId,
|
||||
nickname = nickname,
|
||||
totalCan = totalCan,
|
||||
totalKrw = totalKrw.toInt(),
|
||||
|
||||
Reference in New Issue
Block a user