mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 20:12:39 +00:00
[+] Support setting favourite items
This commit is contained in:
parent
a813535e3f
commit
8c7fd78bd4
@ -97,9 +97,9 @@ class Maimai2ServletController(
|
||||
"userCourseList" to repos.userCourse.findByUser_Card_ExtId(userId)
|
||||
) }
|
||||
|
||||
val getUserFavorite = UserReqHandler { _, userId -> mapOf(
|
||||
val getUserFavorite = UserReqHandler { req, userId -> mapOf(
|
||||
"userId" to userId,
|
||||
"userFavoriteData" to repos.userFavorite.findByUser_Card_ExtId(userId)
|
||||
"userFavorite" to repos.userFavorite.findByUser_Card_ExtIdAndItemKind(userId, req["itemKind"] as Int)
|
||||
) }
|
||||
|
||||
val getUserActivity = UserReqHandler { _, userId ->
|
||||
|
||||
@ -61,6 +61,8 @@ interface Mai2UserFavoriteRepo : Mai2UserLinked<Mai2UserFavorite> {
|
||||
fun findByUserAndItemKind(user: Mai2UserDetail, kind: Int): Optional<Mai2UserFavorite>
|
||||
|
||||
fun findByUserIdAndItemKind(userId: Long, kind: Int): List<Mai2UserFavorite>
|
||||
|
||||
fun findByUser_Card_ExtIdAndItemKind(userId: Long, kind: Int): Optional<Mai2UserFavorite>
|
||||
}
|
||||
|
||||
interface Mai2UserFriendSeasonRankingRepo : Mai2UserLinked<Mai2UserFriendSeasonRanking> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user