- 추가 슬롯 개수와 가격 조회 기능 추가
This commit is contained in:
2024-07-25 21:28:17 +09:00
parent 77a9f1a13c
commit abb60f5743
5 changed files with 82 additions and 1 deletions

View File

@@ -0,0 +1,31 @@
package kr.co.vividnext.sodalive.alarm
import org.springframework.stereotype.Service
@Service
class AlarmService(private val repository: AlarmRepository) {
fun getSlotQuantityAndPrice(memberId: Long): GetSlotQuantityAndPriceResponse {
val slotQuantity = repository.getSlotQuantity(memberId)
return GetSlotQuantityAndPriceResponse(
slotQuantity = slotQuantity,
price = when (slotQuantity) {
0 -> {
30
}
1 -> {
60
}
2 -> {
100
}
else -> {
0
}
}
)
}
}