diff --git a/xuqm-bugcollect-service/src/main/java/com/xuqm/bugcollect/repository/LogIssueEventRepository.java b/xuqm-bugcollect-service/src/main/java/com/xuqm/bugcollect/repository/LogIssueEventRepository.java index 922f3d3..a2bb0bb 100644 --- a/xuqm-bugcollect-service/src/main/java/com/xuqm/bugcollect/repository/LogIssueEventRepository.java +++ b/xuqm-bugcollect-service/src/main/java/com/xuqm/bugcollect/repository/LogIssueEventRepository.java @@ -25,7 +25,7 @@ public interface LogIssueEventRepository extends JpaRepository findByAppKeyAndCreatedAtBetween( String appKey, LocalDateTime from, LocalDateTime to, Pageable pageable); - @Query("SELECT e.createdAt, COUNT(e), COUNT(DISTINCT e.userId) FROM LogIssueEventEntity e " + + @Query("SELECT MIN(e.createdAt), COUNT(e), COUNT(DISTINCT e.userId) FROM LogIssueEventEntity e " + "WHERE e.issueId = :issueId AND e.createdAt BETWEEN :from AND :to " + "GROUP BY FUNCTION('DATE', e.createdAt) ORDER BY FUNCTION('DATE', e.createdAt)") List findDailyCountsByIssueId(