fix(can): 특정 회원(2, 4, 44144) 접속 시 getCans 통화를 JPY로 강제

- CanService.getCans 시그니처를 isNotSelectedCurrency(Boolean) → forcedCurrency(String?)로 변경해 의도 명확화
- 통화 결정 로직을 forcedCurrency 우선 적용 후, 국가 코드(KR=KRW, 그 외=USD)로 fallback
- CanController에서 회원 ID가 2, 4, 44144인 경우 forcedCurrency="JPY"로 설정하여 서비스 호출
This commit is contained in:
2026-05-01 14:38:24 +09:00
parent dc11f44a32
commit b98cc4b018
2 changed files with 10 additions and 10 deletions

View File

@@ -14,14 +14,10 @@ class CanService(
private val repository: CanRepository,
private val countryContext: CountryContext
) {
fun getCans(isNotSelectedCurrency: Boolean): List<CanResponse> {
val currency = if (isNotSelectedCurrency) {
null
} else {
when (countryContext.countryCode) {
"KR" -> "KRW"
else -> "USD"
}
fun getCans(forcedCurrency: String? = null): List<CanResponse> {
val currency = forcedCurrency ?: when (countryContext.countryCode) {
"KR" -> "KRW"
else -> "USD"
}
return repository.findAllByStatusAndCurrency(status = CanStatus.SALE, currency = currency)
}