Skip to content

Commit

Permalink
휴일 조회시 정렬 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
gidskql6671 committed May 30, 2024
1 parent f77136a commit 584542f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ class FineService(
val solvedDates = problemsOfUsers[user.id]!!
.groupingBy { it.solvedDate }.eachCount()

myLogger.error { solvedDates }
myLogger.error { targetDates }
result[userDto] = targetDates.count {
if (solvedDates.containsKey(it)) {
solvedDates[it]!! < group.goalSolveCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import java.time.LocalDate
interface HolidayRepository: JpaRepository<Holiday, Long> {

fun findAllByGroupAndDateBetween(group: Group, start: LocalDate, end: LocalDate): List<Holiday>
fun findAllByGroupAndDateBetweenOrderByDate(group: Group, start: LocalDate, end: LocalDate): List<Holiday>
fun existsByGroupAndDate(group: Group, date: LocalDate): Boolean
fun deleteByGroupAndDateIn(group: Group, date: List<LocalDate>)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ class HolidayService(
}

return holidayRepository
.findAllByGroupAndDateBetween(group, start, end)
.stream()
.findAllByGroupAndDateBetweenOrderByDate(group, start, end)
.map(Holiday::date)
.toList()
}
}

0 comments on commit 584542f

Please sign in to comment.