[DIVA] Rival support and configurable border.

This commit is contained in:
samnyan
2020-01-21 17:43:25 +08:00
parent 38120a3aa9
commit 5fa287ffb6
8 changed files with 221 additions and 13 deletions

View File

@@ -21,6 +21,8 @@ import java.util.Optional;
public interface PlayerPvRecordRepository extends JpaRepository<PlayerPvRecord, Long> {
Optional<PlayerPvRecord> findByPdIdAndPvIdAndEditionAndDifficulty(PlayerProfile profile, int pvId, Edition edition, Difficulty difficulty);
Optional<PlayerPvRecord> findByPdId_PdIdAndPvIdAndEditionAndDifficulty(int pdId, int pvId, Edition edition, Difficulty difficulty);
@Query("SELECT COUNT(t1.id) as ranking from DivaPlayerPvRecord as t1 " +
"where t1.maxScore >= (" +
"SELECT maxScore from DivaPlayerPvRecord where pvId = :pvId and pdId = :pdId and edition = :edition and difficulty = :difficulty" +