Skip to content

Commit

Permalink
feat: 출석자 상세 조회 native Query 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
SHEOMM committed Mar 30, 2024
1 parent 27ee2e5 commit 8c6f1a6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public interface AttendeeRepository extends JpaRepository<Attendee, Long> {
+ "GROUP BY a.course_id", nativeQuery = true)
public List<EachClassAttendeeCountInfo> countAttendeesEachCourseByManagerId(@Param("managerId") Long managerId);

@Query(value = "SELECT atda.id as AttendanceId, sess.name as AttendeeName, atda.status as AttendanceStatus, atda.created_at as AttendanceTime\n"
@Query(value = "SELECT atda.id as AttendanceId, sess.name as SessionName, atda.is_attended as AttendanceStatus, atda.created_at as AttendanceTime\n"
+ "from attendance atda\n"
+ "INNER JOIN session as sess ON atd.id = session.attendance_id\n"
+ "INNER JOIN session as sess ON atda.session_id = sess.id\n"
+ "where atda.attendee_id = :attendeeId\n"
+ "GROUP BY atda.id", nativeQuery = true)
public List<AttendeeAttendDetailInfo> findAttendanceInfoByAttendeeId(@Param("attendeeId") Long attendeeId);
Expand Down

0 comments on commit 8c6f1a6

Please sign in to comment.