hufscheer / spectator-server

7 stars 0 forks source link

[FEAT] 리그팀 라운드 별로 조회할 수 있게 쿼리 조건 추가 #152

Closed ldk980130 closed 4 months ago

ldk980130 commented 5 months ago

🌍 이슈 번호

📝 구현 내용

    public List<LeagueTeam> findByLeagueAndRound(final League league, Integer round) {
        return jpaQueryFactory
                .selectFrom(leagueTeam)
                .leftJoin(gameTeam).on(leagueTeam.eq(gameTeam.leagueTeam))
                .where(DynamicBooleanBuilder.builder()
                        .and(() -> leagueTeam.league.eq(league))
                        .and(() -> gameTeam.game.round.eq(round))
                        .build())
                .orderBy(leagueTeam.name.asc())
                .fetch();
    }

🍀 확인해야 할 부분