유저 행동 데이터, 포인트 추가 #309

Merged
klaus merged 25 commits from test into main 2025-04-24 02:44:58 +00:00
1 changed files with 14 additions and 7 deletions
Showing only changes of commit 7c3b7cffc2 - Show all commits

View File

@ -50,13 +50,20 @@ class OrderService(
} }
order.point = usedPoint order.point = usedPoint
canPaymentService.spendCan( val remainingCan = order.can - (usedPoint / 10)
memberId = member.id!!, if (order.type == OrderType.RENTAL && content.isPointAvailable && usedPoint > 0) {
needCan = order.can - (usedPoint / 10), order.can = remainingCan
canUsage = CanUsage.ORDER_CONTENT, }
order = order,
container = container if (remainingCan > 0) {
) canPaymentService.spendCan(
memberId = member.id!!,
needCan = remainingCan,
canUsage = CanUsage.ORDER_CONTENT,
order = order,
container = container
)
}
} }
private fun orderContent(orderType: OrderType, content: AudioContent, member: Member): Order { private fun orderContent(orderType: OrderType, content: AudioContent, member: Member): Order {