From 25d1d813f193fe1737e82dd59b660572bd1f8240 Mon Sep 17 00:00:00 2001 From: Klaus Date: Sat, 11 Oct 2025 03:37:46 +0900 Subject: [PATCH] =?UTF-8?q?refactor(admin-charge):=20HQL=20=ED=8C=8C?= =?UTF-8?q?=EC=8B=B1=20=EC=97=90=EB=9F=AC=20=ED=95=B4=EA=B2=B0=20=EC=9C=84?= =?UTF-8?q?=ED=95=B4=20RIGHT=20=E2=86=92=20substring/length=20=EC=B9=98?= =?UTF-8?q?=ED=99=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sodalive/admin/charge/AdminChargeStatusQueryRepository.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/admin/charge/AdminChargeStatusQueryRepository.kt b/src/main/kotlin/kr/co/vividnext/sodalive/admin/charge/AdminChargeStatusQueryRepository.kt index 2e94f84..e3809e9 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/admin/charge/AdminChargeStatusQueryRepository.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/admin/charge/AdminChargeStatusQueryRepository.kt @@ -27,7 +27,7 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory ), "%Y-%m-%d" ) - val currency = Expressions.stringTemplate("RIGHT({0}, 3)", payment.locale) + val currency = Expressions.stringTemplate("substring({0}, length({0}) - 2, 3)", payment.locale) return queryFactory .select( @@ -70,7 +70,7 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory ), "%Y-%m-%d %H:%i:%s" ) - val currencyExpr = Expressions.stringTemplate("RIGHT({0}, 3)", payment.locale) + val currencyExpr = Expressions.stringTemplate("substring({0}, length({0}) - 2, 3)", payment.locale) val whereBuilder = BooleanBuilder() whereBuilder.and(charge.createdAt.goe(startDate)) .and(charge.createdAt.loe(endDate))