From 3f96cc0dd60510e4253fbd304e649c6ed2954e56 Mon Sep 17 00:00:00 2001 From: hwan2-99 Date: Tue, 28 May 2024 01:44:57 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20=EB=88=84=EB=9D=BD=EB=90=9C=20peri?= =?UTF-8?q?odExpression=20=EC=B6=94=EA=B0=80(KakaoFunding#181)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/kakaoshare/backend/common/util/RepositoryUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/kakaoshare/backend/common/util/RepositoryUtils.java b/src/main/java/org/kakaoshare/backend/common/util/RepositoryUtils.java index 5e4c21992..6d8ba1208 100644 --- a/src/main/java/org/kakaoshare/backend/common/util/RepositoryUtils.java +++ b/src/main/java/org/kakaoshare/backend/common/util/RepositoryUtils.java @@ -75,6 +75,10 @@ public static > BooleanExpression eqExpression return stringExpression.eq(target); } + public static BooleanExpression periodExpression(final DateTimePath dateExpression, + final Date date) { + return dateExpression.between(date.getStartDateTime(), date.getEndDateTime()); + } public static > BooleanExpression eqExpression(final SimpleExpression simpleExpression, final SimpleExpression target) { return simpleExpression.eq(target);