Skip to content

Commit

Permalink
chore(MeetingSearchRepository): 삼항연산자 -> if 문으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
mikekks committed Jan 7, 2025
1 parent ec25e8b commit 7842eb0
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ public Page<Meeting> findAllByQuery(MeetingV2GetAllMeetingQueryDto queryCommand,
@Override
public List<Meeting> findRecommendMeetings(List<Integer> meetingIds, Time time) {

return queryFactory
.selectFrom(meeting)
.where(
meetingIds == null ? eqStatus(List.of(String.valueOf(EnMeetingStatus.APPLY_ABLE.getValue())), time) :
meeting.id.in(meetingIds)
)
JPAQuery<Meeting> query = queryFactory.selectFrom(meeting)
.innerJoin(meeting.user, user)
.fetchJoin()
.fetch();
.fetchJoin();

if (meetingIds == null) {
query.where(eqStatus(List.of(String.valueOf(EnMeetingStatus.APPLY_ABLE.getValue())), time));
return query.fetch();
}

query.where(meeting.id.in(meetingIds));
return query.fetch();
}

private List<Meeting> getMeetings(MeetingV2GetAllMeetingQueryDto queryCommand, Pageable pageable, Time time) {
Expand Down

0 comments on commit 7842eb0

Please sign in to comment.