Compare commits

...

2 Commits

Author SHA1 Message Date
32935aed88 feat(charge): payloadJson의 amount
- 소수점 아래 불필요한 0을 제거
2025-10-02 19:59:04 +09:00
c72adbfc4b temp(charge): 캔 리스트
- 해외 충전 테스트를 위해 전체 캔 리스트 표시
2025-10-02 19:56:23 +09:00
2 changed files with 4 additions and 3 deletions

View File

@@ -14,10 +14,10 @@ import java.time.format.DateTimeFormatter
class CanService(private val repository: CanRepository) {
fun getCans(geoCountry: GeoCountry): List<CanResponse> {
val currency = when (geoCountry) {
GeoCountry.KR -> "USD"
GeoCountry.KR -> "KRW"
else -> "USD"
}
return repository.findAllByStatusAndCurrency(status = CanStatus.SALE, currency = currency)
return repository.findAllByStatus(status = CanStatus.SALE)
}
fun getCanStatus(member: Member, container: String): GetCanStatusResponse {

View File

@@ -33,6 +33,7 @@ import org.springframework.retry.annotation.Retryable
import org.springframework.stereotype.Service
import org.springframework.transaction.annotation.Transactional
import java.math.BigDecimal
import java.math.RoundingMode
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
@@ -264,7 +265,7 @@ class ChargeService(
val savedCharge = chargeRepository.save(charge)
val chargeId = savedCharge.id!!
val amount = savedCharge.payment!!.price
val amount = savedCharge.payment!!.price.setScale(4, RoundingMode.HALF_UP).stripTrailingZeros()
val reqDate = savedCharge.createdAt!!.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))
val sign = DigestUtils.sha512Hex(
String.format(