diff --git a/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceRepository.kt b/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceRepository.kt index 58b420bc..cac7bb35 100644 --- a/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceRepository.kt +++ b/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceRepository.kt @@ -8,5 +8,5 @@ interface AttendanceRepository : JpaRepository { fun findByUserIdAndStudyId(userId: Long, studyId: Long): AttendanceEntity? fun findAllByStudyIdOrderByAttendanceAtAsc(studyId: Long): List fun findAllByStudyIdAndStatus(studyId: Long, status: AttendanceStatus): List - fun existsByStudyIdAndStatus(studyId: Long, status: AttendanceStatus): Boolean + fun existsByStudyIdAndStatusNot(studyId: Long, status: AttendanceStatus): Boolean } diff --git a/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceService.kt b/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceService.kt index 236ae8f9..4f6bc4dc 100644 --- a/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceService.kt +++ b/moit-domain/src/main/kotlin/com/mashup/moit/domain/attendance/AttendanceService.kt @@ -57,7 +57,7 @@ class AttendanceService( } fun existFirstAttendanceByStudyId(studyId: Long): Boolean { - return attendanceRepository.existsByStudyIdAndStatus(studyId, AttendanceStatus.ATTENDANCE) + return attendanceRepository.existsByStudyIdAndStatusNot(studyId, AttendanceStatus.UNDECIDED) } @Transactional