We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe88687 commit 59333c8Copy full SHA for 59333c8
src/main/java/Ness/Backend/domain/chat/ChatRepository.java
@@ -14,7 +14,7 @@ public interface ChatRepository extends JpaRepository<Chat, Long>{
14
// 특정 맴버의 일주일치 데이터만 반환
15
@Query( value = "SELECT * FROM chat " +
16
"WHERE member_id = :memberId " +
17
- "AND created_date >= DATE_SUB(NOW(), INTERVAL 1 WEEK) " +
+ "AND CONVERT_TZ(created_date, '+00:00', '+09:00') >= DATE_SUB(CONVERT_TZ(NOW(), '+00:00', '+09:00'), INTERVAL 1 WEEK) " +
18
//"AND created_date BETWEEN DATE_ADD(NOW(), INTERVAL -1 WEEK) AND NOW() " +
19
"ORDER BY created_date ASC",
20
nativeQuery = true)
0 commit comments