fix: split reading sessions based on the date (#2316)
Co-authored-by: WorldTeacher <coding_contact@pm.me>
This commit is contained in:
co-authored by
WorldTeacher
parent
890d7cc230
commit
acca38a404
+1
-1
@@ -40,7 +40,7 @@ public interface ReadingSessionRepository extends JpaRepository<ReadingSessionEn
|
||||
JOIN rs.book b
|
||||
WHERE rs.user.id = :userId
|
||||
AND rs.startTime >= :startOfWeek AND rs.startTime < :endOfWeek
|
||||
GROUP BY b.id, b.metadata.title, rs.bookType
|
||||
GROUP BY b.id, b.metadata.title, rs.bookType, CAST(rs.startTime AS LocalDate)
|
||||
ORDER BY MIN(rs.startTime)
|
||||
""")
|
||||
List<ReadingSessionTimelineDto> findSessionTimelineByUserAndWeek(
|
||||
|
||||
Reference in New Issue
Block a user