룰렛 정렬 순서 수정

1순위 - 활성화 된 상태
2순위 - id
This commit is contained in:
Klaus 2024-02-28 01:09:42 +09:00
parent 48d5f1674f
commit 2f08149e48
1 changed files with 2 additions and 2 deletions

View File

@ -54,9 +54,9 @@ class NewRouletteService(
oldRepository.deleteById(roulette.creatorId)
}
}
rouletteList.sortedBy { it.id }
return rouletteList.asSequence()
return rouletteList.sortedWith(compareByDescending<NewRoulette> { it.isActive }.thenBy { it.id })
.asSequence()
.map {
GetNewRouletteResponse(
it.id,