Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,21 @@ Double findAverageProblemLevelForUserInPeriod(@Param("user") User user, @Param("
@Param("end") LocalDateTime end);

@Query("""
select distinct new com.gamzabat.algohub.feature.user.dto.GetSolutionCommentActivity(s.id, g.id)
select distinct new com.gamzabat.algohub.feature.user.dto.GetSolutionCommentActivity(s.id, g.id)
from GroupMember gm
join gm.studyGroup g
join Problem p on p.studyGroup = g
join Solution s on s.problem = p
join SolutionComment c on c.solution = s
where gm.user = :user
and gm.isVisible = true
and exists (select 1 from SolutionComment c where c.solution = s)
and c.createdAt = (
select max(c2.createdAt)
from SolutionComment c2
where c2.solution = s
)
and c.user <> :user
order by c.createdAt desc
""")
List<GetSolutionCommentActivity> findFeedSolutionsByUserOrdered(User user);

Expand Down
Loading