Skip to content

Commit

Permalink
Merge pull request #57 from Team-Puzzling/refactor/#52-review-api
Browse files Browse the repository at this point in the history
#52 [REFACTOR] 퍼즐 에셋 이름 소문자로 변경
  • Loading branch information
yeseul106 authored Jul 18, 2023
2 parents a17bd22 + e6cac0f commit a39548c
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@ public ProjectOwnPuzzleResponseDto getMyPuzzles(Long memberId, Long projectId, S
List<PuzzleObjectDto> result = new ArrayList<>();
for (int idx = 1; idx <= top15Reviews.size(); idx++) {
Review review = top15Reviews.get(idx - 1);
result.add(PuzzleObjectDto.of(review.getReviewDate(), review.getId(), ("puzzleA" + idx)));
result.add(PuzzleObjectDto.of(review.getReviewDate(), review.getId(), ("puzzlea" + idx)));
}

if (isReviewDay) {
if (!hasTodayReview) {
result.add(PuzzleObjectDto.of(null, null, "puzzleD" + (result.size() + 1)));
result.add(PuzzleObjectDto.of(null, null, "puzzled" + (result.size() + 1)));
}
}
return ProjectOwnPuzzleResponseDto.of(mapperMyPuzzleObject(memberId, projectId), result,
Expand Down Expand Up @@ -134,7 +134,7 @@ public ProjectTeamPuzzleResponseDto getTeamPuzzles(Principal principal, Long pro

if (isReviewDay) {
if (!hasTodayReview) {
teamPuzzleBoard.add(TeamPuzzleObjectDto.of(null, null, "puzzleD" + (teamPuzzleBoard.size()+1)));
teamPuzzleBoard.add(TeamPuzzleObjectDto.of(null, null, "puzzled" + (teamPuzzleBoard.size()+1)));
}
}
return ProjectTeamPuzzleResponseDto.of(mapperMyPuzzleObject(memberId, projectId), teamPuzzleBoard,
Expand Down Expand Up @@ -223,11 +223,11 @@ private String getReviewMemberPercent(Long projectId, int reviewCount) {
float percent = (float) reviewCount/totalProjectMember;

if (percent <= 0.334) {
return "A";
return "a";
} else if (0.334 <= percent && percent <= 0.667 ) {
return "B";
return "b";
} else {
return "C";
return "c";
}
}

Expand Down

0 comments on commit a39548c

Please sign in to comment.