Skip to content

Commit

Permalink
fix: #102 알림장 날짜 정렬
Browse files Browse the repository at this point in the history
  • Loading branch information
sominyun committed Jun 4, 2024
1 parent 14fb2ae commit a61cd84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import org.springframework.data.jpa.repository.JpaRepository
interface ClassroomAnnouncementRepository: JpaRepository<ClassroomAnnouncement,Long> {
fun findTopByClassroomIdOrderByCreatedAtDesc(classroomId : Long) : ClassroomAnnouncement?

fun findAllByClassroomId(classroomId : Long) : List<ClassroomAnnouncement>
fun findAllByClassroomIdOrderByCreatedAtDesc(classroomId : Long) : List<ClassroomAnnouncement>
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ClassroomAnnouncementReader(
}

fun findAllByClassroomId(classroomId: Long): List<ClassroomAnnouncement> {
return classroomAnnouncementRepository.findAllByClassroomId(classroomId)
return classroomAnnouncementRepository.findAllByClassroomIdOrderByCreatedAtDesc(classroomId)
}

fun findById(classroomAnnouncementId: Long) : ClassroomAnnouncement {
Expand Down

0 comments on commit a61cd84

Please sign in to comment.