@@ -20,13 +20,13 @@ public interface GlobalLeaderboardRepository extends Repository<GlobalLeaderboar
2020 " WHERE is_active = 1" +
2121 " AND login.id NOT IN (" +
2222 " SELECT player_id FROM ban" +
23- " WHERE (expires_at is null or expires_at > NOW()) AND ( revoke_time IS NULL OR revoke_time > NOW()) " +
23+ " WHERE (expires_at is null or expires_at > NOW()) AND revoke_time IS NULL" +
2424 " ) " +
2525 " ORDER BY rating DESC LIMIT ?#{#pageable.offset},?#{#pageable.pageSize}" ,
2626 countQuery = "SELECT count(*) FROM ladder1v1_rating WHERE is_active = 1 AND ladder1v1_rating.numGames > 0" +
2727 " AND id NOT IN (" +
2828 " SELECT player_id FROM ban" +
29- " WHERE (expires_at is null or expires_at > NOW()) AND ( revoke_time IS NULL OR revoke_time > NOW()) " +
29+ " WHERE (expires_at is null or expires_at > NOW()) AND revoke_time IS NULL" +
3030 " AND (1=1 OR -1 IN (?,?,?))" +
3131 " ) -- Dummy placeholder for pageable, prevents 'Unknown parameter position': ?,?,?" , nativeQuery = true )
3232 Page <GlobalLeaderboardEntry > getLeaderboardByPage (Pageable pageable );
@@ -43,7 +43,7 @@ public interface GlobalLeaderboardRepository extends Repository<GlobalLeaderboar
4343 "WHERE is_active = 1\n " +
4444 " AND login.id NOT IN (" +
4545 " SELECT player_id FROM ban" +
46- " WHERE (expires_at is null or expires_at <= NOW()) AND ( revoke_time IS NULL OR revoke_time > NOW()) " +
46+ " WHERE (expires_at is null or expires_at > NOW()) AND revoke_time IS NULL" +
4747 " ) " +
4848 "ORDER BY rating DESC) as leaderboard WHERE id = :playerId" , nativeQuery = true )
4949 GlobalLeaderboardEntry findByPlayerId (@ Param ("playerId" ) int playerId );
0 commit comments