Skip to content

Commit

Permalink
[fix] 미션글 미리보기 컴포넌트에서 신고한 이미지는 뜨지않고 완료 수는 제대로 뜨도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchoGreenT committed Sep 14, 2024
1 parent df0e780 commit 42c1206
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public static List<Step> createSteps(List<StepVo> stepVoList, List<GetMissionPos
List<String> images = new ArrayList<>();
for (GetMissionPostListVo mission: missionList) {
if (step.num() == mission.stepNum()) {
images.add(mission.image());
if (!mission.isReported())
images.add(mission.image());
count++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ public List<GetMissionPostListVo> getMissionPostStepNumAndImage(Long userId, Lon
.select(Projections.constructor(
GetMissionPostListVo.class,
missionPost.stepNum,
missionPost.image))
missionPost.image,
missionPost.id.in(reportMissionPostIds)))
.from(missionPost)
.join(missionPost.userFarmClub, userFarmClub)
.join(userFarmClub.farmClub, farmClub)
.where(farmClub.id.eq(farmClubId).and(missionPost.id.notIn(reportMissionPostIds)))
.where(farmClub.id.eq(farmClubId))
.fetch();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

public record GetMissionPostListVo(
int stepNum,
String image
String image,
Boolean isReported
) {
@QueryProjection
public GetMissionPostListVo {
Expand Down

0 comments on commit 42c1206

Please sign in to comment.