Skip to content

Commit

Permalink
Merge pull request #28 from giwoong01/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
giwoong01 authored Sep 27, 2023
2 parents a1cd28d + b77a929 commit 0907e53
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public ExistsMemberHistoryMileageException(final String message) {
}

public ExistsMemberHistoryMileageException() {
this("이미 추가된 내역입니다. 하단의 mileage history를 확인해주세요!");
this("이미 추가된 내역입니다.\n하단의 mileage history를 확인해주세요!");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,15 @@ public MemberRankResDto memberRakingInformation(Long memberId, int departmentNum

Member member = memberRepository.findById(memberId).orElseThrow(NotFoundMemberException::new);

if (member.getDepartment().equals(ChangeDepartment.departmentNumber(departmentNumber))) {
return new MemberRankResDto(member.getMemberId(),
member.getTier(),
member.getScore(),
member.getNickname(),
member.getDepartment(),
myDepartmentRanking(departmentNumber, member.getScore()));
} else {
return new MemberRankResDto(member.getMemberId(),
member.getTier(),
member.getScore(),
member.getNickname(),
member.getDepartment(),
myRanking(member.getScore()));
}
int myRanking = member.getDepartment().equals(ChangeDepartment.departmentNumber(departmentNumber)) ?
myDepartmentRanking(departmentNumber, member.getScore()) : myRanking(member.getScore());

return new MemberRankResDto(member.getMemberId(),
member.getTier(),
member.getScore(),
member.getNickname(),
member.getDepartment(),
myRanking);
}

/**
Expand Down

0 comments on commit 0907e53

Please sign in to comment.