refactor(admin-charge): HQL 파싱 에러 해결 위해 RIGHT → substring/length 치환

This commit is contained in:
2025-10-11 03:37:46 +09:00
parent 778f0c3ba2
commit 25d1d813f1

View File

@@ -27,7 +27,7 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory
), ),
"%Y-%m-%d" "%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 return queryFactory
.select( .select(
@@ -70,7 +70,7 @@ class AdminChargeStatusQueryRepository(private val queryFactory: JPAQueryFactory
), ),
"%Y-%m-%d %H:%i:%s" "%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() val whereBuilder = BooleanBuilder()
whereBuilder.and(charge.createdAt.goe(startDate)) whereBuilder.and(charge.createdAt.goe(startDate))
.and(charge.createdAt.loe(endDate)) .and(charge.createdAt.loe(endDate))