Skip to content

Commit

Permalink
Merge pull request #106 from Kusitms-29th-ASAP/hotfix/menu-order
Browse files Browse the repository at this point in the history
메뉴 날짜 순 정렬
  • Loading branch information
sominyun authored Jun 7, 2024
2 parents 099dd3e + 4f99444 commit d597bf7
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 @@ -7,5 +7,5 @@ import java.time.LocalDate
interface MenuRepository : JpaRepository<Menu, Long> {
fun findBySchoolIdAndDay(schoolId: Long, day: LocalDate): Menu?

fun findBySchoolIdAndDayIn(schoolId: Long, day: List<LocalDate>): List<Menu>
fun findBySchoolIdAndDayInOrderByDayAsc(schoolId: Long, day: List<LocalDate>): List<Menu>
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ class MenuReader(
val lastDayOfMonth = LocalDate.now().withDayOfMonth(LocalDate.now().lengthOfMonth())
val daysOfMonth = firstDayOfMonth.datesUntil(lastDayOfMonth.plusDays(1)).toList()

return menuRepository.findBySchoolIdAndDayIn(schoolId, daysOfMonth)
return menuRepository.findBySchoolIdAndDayInOrderByDayAsc(schoolId, daysOfMonth)
}
}

0 comments on commit d597bf7

Please sign in to comment.