Compare commits

..

2 Commits

2 changed files with 3 additions and 7 deletions

View File

@ -150,18 +150,14 @@ class AudioContentService(
val theme = themeQueryRepository.findThemeByIdAndActive(id = request.themeId)
?: throw SodaException("잘못된 테마입니다. 다시 선택해 주세요.")
if (request.price in 1..9) throw SodaException("콘텐츠의 최소금액은 10캔 입니다.")
if (request.price <= 4) throw SodaException("콘텐츠의 최소금액은 5캔 입니다.")
// DB에 값 추가
val audioContent = AudioContent(
title = request.title,
detail = request.detail,
type = request.type,
price = if (request.price < 0) {
0
} else {
request.price
},
price = request.price,
isAdult = request.isAdult,
isGeneratePreview = if (request.type == AudioContentType.INDIVIDUAL) {
request.isGeneratePreview

View File

@ -42,7 +42,7 @@ data class Order(
var audioContent: AudioContent? = null
set(value) {
can = if (type == OrderType.RENTAL) {
ceil(value?.price!! * 0.7).toInt()
ceil(value?.price!! * 0.6).toInt()
} else {
value?.price!!
}