유료라이브 - 10캔 이상 부터 설정 가능하도록 수정
This commit is contained in:
parent
d5cc28e50b
commit
ff10a9935b
|
@ -190,13 +190,21 @@ class LiveRoomService(
|
||||||
throw SodaException("방 입장 비밀번호 6자리를 입력해 주세요.")
|
throw SodaException("방 입장 비밀번호 6자리를 입력해 주세요.")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (request.price in 1..9) {
|
||||||
|
throw SodaException("유료라이브는 10캔부터 설정 가능 합니다.")
|
||||||
|
}
|
||||||
|
|
||||||
val room = LiveRoom(
|
val room = LiveRoom(
|
||||||
title = request.title,
|
title = request.title,
|
||||||
notice = request.content,
|
notice = request.content,
|
||||||
beginDateTime = beginDateTime,
|
beginDateTime = beginDateTime,
|
||||||
numberOfPeople = request.numberOfPeople,
|
numberOfPeople = request.numberOfPeople,
|
||||||
isAdult = request.isAdult,
|
isAdult = request.isAdult,
|
||||||
price = request.price,
|
price = if (request.price < 0) {
|
||||||
|
0
|
||||||
|
} else {
|
||||||
|
request.price
|
||||||
|
},
|
||||||
type = request.type,
|
type = request.type,
|
||||||
password = request.password
|
password = request.password
|
||||||
)
|
)
|
||||||
|
@ -456,9 +464,9 @@ class LiveRoomService(
|
||||||
charge.useCan = useCan
|
charge.useCan = useCan
|
||||||
|
|
||||||
when (it.paymentGateway) {
|
when (it.paymentGateway) {
|
||||||
PaymentGateway.PG -> booker.pgRewardCan += charge.rewardCan
|
|
||||||
PaymentGateway.GOOGLE_IAP -> booker.googleRewardCan += charge.rewardCan
|
PaymentGateway.GOOGLE_IAP -> booker.googleRewardCan += charge.rewardCan
|
||||||
PaymentGateway.APPLE_IAP -> booker.appleRewardCan += charge.rewardCan
|
PaymentGateway.APPLE_IAP -> booker.appleRewardCan += charge.rewardCan
|
||||||
|
else -> booker.pgRewardCan += charge.rewardCan
|
||||||
}
|
}
|
||||||
charge.member = booker
|
charge.member = booker
|
||||||
|
|
||||||
|
@ -922,9 +930,9 @@ class LiveRoomService(
|
||||||
charge.useCan = useCan
|
charge.useCan = useCan
|
||||||
|
|
||||||
when (it.paymentGateway) {
|
when (it.paymentGateway) {
|
||||||
PaymentGateway.PG -> donator.pgRewardCan += charge.rewardCan
|
|
||||||
PaymentGateway.GOOGLE_IAP -> donator.googleRewardCan += charge.rewardCan
|
PaymentGateway.GOOGLE_IAP -> donator.googleRewardCan += charge.rewardCan
|
||||||
PaymentGateway.APPLE_IAP -> donator.appleRewardCan += charge.rewardCan
|
PaymentGateway.APPLE_IAP -> donator.appleRewardCan += charge.rewardCan
|
||||||
|
else -> donator.pgRewardCan += charge.rewardCan
|
||||||
}
|
}
|
||||||
charge.member = donator
|
charge.member = donator
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue