forked from Cookies_Github_mirror/AquaDX
[O] Generalize ranking and find by card
This commit is contained in:
@@ -3,7 +3,6 @@ package icu.samnyan.aqua.sega.maimai2.dao.userdata
|
||||
import icu.samnyan.aqua.net.games.GenericUserDataRepo
|
||||
import icu.samnyan.aqua.sega.general.model.Card
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserDetail
|
||||
import org.springframework.data.jpa.repository.Query
|
||||
import org.springframework.stereotype.Repository
|
||||
import org.springframework.transaction.annotation.Transactional
|
||||
import java.util.*
|
||||
@@ -11,13 +10,8 @@ import java.util.*
|
||||
|
||||
@Repository("Maimai2UserDataRepository")
|
||||
interface UserDataRepository : GenericUserDataRepo<UserDetail, Long> {
|
||||
override fun findByCard(card: Card): UserDetail?
|
||||
|
||||
fun findByCardExtId(userId: Long): Optional<UserDetail>
|
||||
|
||||
@Transactional
|
||||
fun deleteByCard(card: Card)
|
||||
|
||||
@Query("select count(*) from Maimai2UserData where playerRating > :rating")
|
||||
override fun getRanking(rating: Int): Long
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user