-
Notifications
You must be signed in to change notification settings - Fork 3
[feat] 마이페이지 조회 기능 #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] 마이페이지 조회 기능 #119
Conversation
backend/src/main/java/io/f1/backend/domain/user/dto/MyPage.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/io/f1/backend/domain/stat/dao/StatRepositoryAdapter.java
Outdated
Show resolved
Hide resolved
backend/src/main/java/io/f1/backend/domain/stat/dao/StatJpaRepository.java
Outdated
Show resolved
Hide resolved
| Map<Object, Object> statMap = hashOps.entries(statUserKey); | ||
|
|
||
| if (rank == null || score == null || statMap.isEmpty()) { | ||
| throw new IllegalStateException("User not found in Redis: " + userId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
왜 여기는 customException을 쓰지 않으신건지 궁금합니다!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구조가 Redis 조회 -> 없으면 -> MySQL 조회로 넘어가게 되는데, 위 코드에서 던진 예외를 아래의 코드로 처리를 합니다. 그래서 해당 예외는 프론트로 내려가지 않기 때문에 CustomException 처리를 하지 않았습니다 !
try {
return redisRepository.getStatByUserId(userId);
} catch (Exception e) {
log.error("Redis miss, fallback to MySQL for userId={}", userId, e);
}
sehee123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다! 🚌
LimKangHyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다른 분들이 리뷰를 꼼꼼하게 해주셨네요! 고생하셨습니다!
silver-eunjoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 !! :)
🛰️ Issue Number
🪐 작업 내용
📚 Reference
✅ Check List