memberId가 특정 번호일 때 currency와 관계없이 모든 구매 가능한 캔이 출력되도록 수정

This commit is contained in:
2026-01-16 11:24:48 +09:00
parent ed2660adc6
commit 482241f734
3 changed files with 22 additions and 12 deletions

View File

@@ -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)
}