알람
- 추가 슬롯 개수와 가격 조회 기능 추가
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user