Skip to content

Commit

Permalink
chore: changed calculateLuckyStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
minjoon-98 committed Jul 24, 2024
1 parent e53fa5d commit 0f182bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public ApiResponse<List<ChallengeListDto>> getChallengeList(@RequestParam("chall
Member member = memberService.findMemberByLoginId(); // 로그인한 멤버 찾기
List<ChallengeListDto> challengeList = challenges.stream()
.map(challenge -> {

boolean isComplete = answerService.findIsCompleteAnswer(challenge, member);
return new ChallengeListDto(challenge, isComplete);
})
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ongjong/namanmoo/service/LuckyServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ public Integer calculateLuckyStatus(Lucky lucky, String answerCreateDate, String
Long betweenLuckyAnswer = DateUtil.getInstance().getDateDifference(luckyStartDate, answerCreateDate);
if (betweenLuckyAnswer == 1) {
return 1; // 1일 and (미참여 or 참여) : 새싹
} else if (betweenLuckyAnswer == 15 && answerContent == null) {
return 1; // 15일 and 미참여 : 새싹
// } else if (betweenLuckyAnswer == 15 && answerContent == null) {
// return 1; // 15일 and 미참여 : 새싹
} else if (betweenLuckyAnswer == 15) {
return 2; // 15일 and 참여 : 행운이
} else if (betweenLuckyAnswer == 30 && answerContent == null) {
return 2; // 30일 and 미참여 : 행운이
// } else if (betweenLuckyAnswer == 30 && answerContent == null) {
// return 2; // 30일 and 미참여 : 행운이
} else {
return 3; // 나머지 엑스텀프
}
Expand Down

0 comments on commit 0f182bd

Please sign in to comment.