memberId가 특정 번호일 때 currency와 관계없이 모든 구매 가능한 캔이 출력되도록 수정
This commit is contained in:
@@ -15,10 +15,14 @@ class CanService(
|
||||
private val repository: CanRepository,
|
||||
private val countryContext: CountryContext
|
||||
) {
|
||||
fun getCans(): List<CanResponse> {
|
||||
val currency = when (countryContext.countryCode) {
|
||||
"KR" -> "KRW"
|
||||
else -> "USD"
|
||||
fun getCans(isNotSelectedCurrency: Boolean): List<CanResponse> {
|
||||
val currency = if (isNotSelectedCurrency) {
|
||||
null
|
||||
} else {
|
||||
when (countryContext.countryCode) {
|
||||
"KR" -> "KRW"
|
||||
else -> "USD"
|
||||
}
|
||||
}
|
||||
return repository.findAllByStatusAndCurrency(status = CanStatus.SALE, currency = currency)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user