From fe15750ddf41ecce14faf07d9e1e43e7c470bb1a Mon Sep 17 00:00:00 2001 From: "gayoun.park" Date: Fri, 23 Jan 2026 10:41:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EB=82=A0=EC=A7=9C=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=20=EC=A1=B0=ED=9A=8C,=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=20=EC=A1=B0=ED=9A=8C=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repository/log/AuditLogRepositoryImpl.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/log/AuditLogRepositoryImpl.java b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/log/AuditLogRepositoryImpl.java index 5818fe5a..5e655440 100644 --- a/src/main/java/com/kamco/cd/kamcoback/postgres/repository/log/AuditLogRepositoryImpl.java +++ b/src/main/java/com/kamco/cd/kamcoback/postgres/repository/log/AuditLogRepositoryImpl.java @@ -22,7 +22,6 @@ import com.querydsl.core.types.dsl.StringExpression; import com.querydsl.jpa.impl.JPAQueryFactory; import io.micrometer.common.util.StringUtils; import java.time.LocalDate; -import java.time.LocalDateTime; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.List; @@ -417,12 +416,13 @@ public class AuditLogRepositoryImpl extends QuerydslRepositorySupport if (Objects.isNull(startDate) || Objects.isNull(endDate)) { return null; } - LocalDateTime startDateTime = startDate.atStartOfDay(); - LocalDateTime endDateTime = endDate.plusDays(1).atStartOfDay(); + ZoneId zoneId = ZoneId.of("Asia/Seoul"); + ZonedDateTime startDateTime = startDate.atStartOfDay(zoneId); + ZonedDateTime endDateTime = endDate.plusDays(1).atStartOfDay(zoneId); return auditLogEntity .createdDate - .goe(ZonedDateTime.from(startDateTime)) - .and(auditLogEntity.createdDate.lt(ZonedDateTime.from(endDateTime))); + .goe(startDateTime) + .and(auditLogEntity.createdDate.lt(endDateTime)); } private BooleanExpression createdDateBetween(LocalDate startDate, LocalDate endDate) { @@ -471,11 +471,11 @@ public class AuditLogRepositoryImpl extends QuerydslRepositorySupport } private BooleanExpression eventEndedAtEqDate(LocalDate logDate) { - StringExpression eventEndedDate = - Expressions.stringTemplate("to_char({0}, 'YYYY-MM-DD')", auditLogEntity.createdDate); - LocalDateTime comparisonDate = logDate.atStartOfDay(); + ZoneId zoneId = ZoneId.of("Asia/Seoul"); + ZonedDateTime start = logDate.atStartOfDay(zoneId); + ZonedDateTime end = logDate.plusDays(1).atStartOfDay(zoneId); - return eventEndedDate.eq(comparisonDate.toString()); + return auditLogEntity.createdDate.goe(start).and(auditLogEntity.createdDate.lt(end)); } private BooleanExpression menuUidEq(String menuUid) {