Revert "[O] Let json lib do its magic"

This reverts commit 5923987c7f.
pull/108/head
Menci 2025-01-12 12:13:45 +08:00
parent e06e8b4cf0
commit ccbd40e03e
1 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@ import kotlin.concurrent.Volatile
class GetGameRankingHandler(
private val queryFactory: JPAQueryFactory
) : BaseHandler {
private data class MusicRankingItem(val id: Int, val point: Long, val userName: String = "")
private data class MusicRankingItem(val musicId: Int, val weight: Long)
@Volatile
private var musicRankingCache: List<MusicRankingItem> = emptyList()
@ -54,7 +54,7 @@ class GetGameRankingHandler(
override fun handle(request: Map<String, Any>): Any = mapOf(
"type" to request["type"],
"gameRankingList" to when(request["type"]) {
1 -> musicRankingCache
1 -> musicRankingCache.map { mapOf("id" to it.musicId, "point" to it.weight, "userName" to "") }
else -> emptyList()
}
)