Skip to content

Commit

Permalink
Merge pull request #281 from bankidz/dev
Browse files Browse the repository at this point in the history
🔨 refactor: 돈길 알림 로직 분기점 수정
  • Loading branch information
sanbonai06 authored Dec 5, 2022
2 parents 3fccf06 + 1bbefcb commit c588a26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,16 @@ public ChallengeListMapperDTO readWalkingChallenge(Challenge challenge) {
}
}
if (falseCnt >= risk) {
if (challenge.getChallengeStatus() == failed) {
return new ChallengeListMapperDTO(challenge, progressDTOList, false);
}
challenge.setChallengeStatus(failed);
challengeRepository.save(challenge);
return new ChallengeListMapperDTO(challenge, progressDTOList, true);
} else if (diffWeeks > challenge.getWeeks()) {
if (challenge.getChallengeStatus() == achieved) {
return new ChallengeListMapperDTO(challenge, progressDTOList, false);
}
challenge.setChallengeStatus(achieved);
challengeRepository.save(challenge);
return new ChallengeListMapperDTO(challenge, progressDTOList, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ public void challengeFailedNotification(User contractUser, ChallengeUser challen
notificationCategory, "/");
}
log.info("부모 유저 id = {}에게 유저 id = {}의 돈길 id = {} 돈길 실패 알림 전송", contractUser.getId(),
challengeUser.getChallenge().getId(), challengeUser.getChallenge().getId());
challengeUser.getUser().getId(), challengeUser.getChallenge().getId());
}

@Async
Expand Down

0 comments on commit c588a26

Please sign in to comment.