Skip to content

Commit

Permalink
hotfix : 전체 미션 조회 - 개수 제한 해제, 미션 진행 중도 포함
Browse files Browse the repository at this point in the history
  • Loading branch information
great-park committed Oct 25, 2023
1 parent ae674fa commit 36f0ce3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public List<Mission> getMissionsRandomOrder() {
@Override
@Cacheable(value = "total_missions")
public List<Mission> getTotalMissions() {
return getMissions(isMissionRecruiting());
return getMissions(isMissionNotFinished());
}

private List<Mission> getMissions(BooleanExpression isParticipating, BooleanExpression isNotCompleted) {
Expand All @@ -84,13 +84,12 @@ private List<Mission> getMissions(Long memberId, BooleanExpression isMissionNotF
.fetch();
}

private List<Mission> getMissions(BooleanExpression isMissionRecruiting) {
private List<Mission> getMissions(BooleanExpression isMissionNotFinished) {
return jpaQueryFactory
.select(mission)
.from(mission)
.where(isMissionRecruiting)
.where(isMissionNotFinished)
.orderBy(mission.createdAt.desc())
.limit(3)
.fetch();
}

Expand Down

0 comments on commit 36f0ce3

Please sign in to comment.