mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-07 19:27:26 +08:00
[M] Rename var
This commit is contained in:
@@ -50,7 +50,7 @@ class ChusanServletController(
|
|||||||
val getGameMapAreaCondition: GetGameMapAreaConditionHandler,
|
val getGameMapAreaCondition: GetGameMapAreaConditionHandler,
|
||||||
|
|
||||||
val mapper: StringMapper,
|
val mapper: StringMapper,
|
||||||
val repos: Chu3Repos,
|
val db: Chu3Repos,
|
||||||
) {
|
) {
|
||||||
val logger = LoggerFactory.getLogger(ChusanServletController::class.java)
|
val logger = LoggerFactory.getLogger(ChusanServletController::class.java)
|
||||||
|
|
||||||
@@ -162,32 +162,32 @@ fun ChusanServletController.init() {
|
|||||||
|
|
||||||
// User handlers
|
// User handlers
|
||||||
"GetUserData" user { _, u ->
|
"GetUserData" user { _, u ->
|
||||||
val user = repos.userData.findByCard_ExtId(u)() ?: (400 - "User not found")
|
val user = db.userData.findByCard_ExtId(u)() ?: (400 - "User not found")
|
||||||
mapOf("userId" to u, "userData" to user)
|
mapOf("userId" to u, "userData" to user)
|
||||||
}
|
}
|
||||||
"GetUserOption" user { _, u ->
|
"GetUserOption" user { _, u ->
|
||||||
val userGameOption = repos.userGameOption.findSingleByUser_Card_ExtId(u)() ?: (400 - "User not found")
|
val userGameOption = db.userGameOption.findSingleByUser_Card_ExtId(u)() ?: (400 - "User not found")
|
||||||
mapOf("userId" to u, "userGameOption" to userGameOption)
|
mapOf("userId" to u, "userGameOption" to userGameOption)
|
||||||
}
|
}
|
||||||
"GetUserActivity" user { req, u ->
|
"GetUserActivity" user { req, u ->
|
||||||
val kind = parsing { req["kind"]!!.int }
|
val kind = parsing { req["kind"]!!.int }
|
||||||
val a = repos.userActivity.findAllByUser_Card_ExtIdAndKind(u, kind).sortedBy { it.sortNumber }
|
val a = db.userActivity.findAllByUser_Card_ExtIdAndKind(u, kind).sortedBy { it.sortNumber }
|
||||||
mapOf("userId" to u, "length" to a.size, "kind" to kind, "userActivityList" to a)
|
mapOf("userId" to u, "length" to a.size, "kind" to kind, "userActivityList" to a)
|
||||||
}
|
}
|
||||||
"GetUserCharge" user { _, u -> repos.userCharge.findByUser_Card_ExtId(u)
|
"GetUserCharge" user { _, u -> db.userCharge.findByUser_Card_ExtId(u)
|
||||||
.let { mapOf("userId" to u, "length" to it.size, "userChargeList" to it) }
|
.let { mapOf("userId" to u, "length" to it.size, "userChargeList" to it) }
|
||||||
}
|
}
|
||||||
"GetUserDuel" user { _, u -> repos.userDuel.findByUser_Card_ExtId(u)
|
"GetUserDuel" user { _, u -> db.userDuel.findByUser_Card_ExtId(u)
|
||||||
.let { mapOf("userId" to u, "length" to it.size, "userDuelList" to it) }
|
.let { mapOf("userId" to u, "length" to it.size, "userDuelList" to it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other handlers
|
// Other handlers
|
||||||
"GetGameGachaCardById" { repos.gameGachaCard.findAllByGachaId(parsing { it["gachaId"]!!.int }).let {
|
"GetGameGachaCardById" { db.gameGachaCard.findAllByGachaId(parsing { it["gachaId"]!!.int }).let {
|
||||||
mapOf("gachaId" to it.size, "length" to it.size, "isPickup" to false, "gameGachaCardList" to it, "emissionList" to empty, "afterCalcList" to empty)
|
mapOf("gachaId" to it.size, "length" to it.size, "isPickup" to false, "gameGachaCardList" to it, "emissionList" to empty, "afterCalcList" to empty)
|
||||||
} }
|
} }
|
||||||
|
|
||||||
// Static
|
// Static
|
||||||
"GetGameEvent" static { repos.gameEvent.findByEnable(true).let { mapOf("type" to 1, "length" to it.size, "gameEventList" to it) } }
|
"GetGameEvent" static { db.gameEvent.findByEnable(true).let { mapOf("type" to 1, "length" to it.size, "gameEventList" to it) } }
|
||||||
"GetGameCharge" static { repos.gameCharge.findAll().let { mapOf("length" to it.size, "gameChargeList" to it) } }
|
"GetGameCharge" static { db.gameCharge.findAll().let { mapOf("length" to it.size, "gameChargeList" to it) } }
|
||||||
"GetGameGacha" static { repos.gameGacha.findAll().let { mapOf("length" to it.size, "gameGachaList" to it, "registIdList" to empty) } }
|
"GetGameGacha" static { db.gameGacha.findAll().let { mapOf("length" to it.size, "gameGachaList" to it, "registIdList" to empty) } }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user