Conversation
jihaneol
reviewed
Apr 15, 2025
| @Transactional | ||
| public OrderResponse createInstantOrder(User user, OrderRequest instantOrderRequest) { | ||
| //락키 생성 (상품 ID를 기반으로) | ||
| String lockKey = "order:instant:" + instantOrderRequest.orderDetailRequestList().get(0).saleProductId(); |
Contributor
There was a problem hiding this comment.
OrderRequest 와 많이 엮여 있습니다.
orderDetailRequestList() → get(0) → saleProductId()
한번 개선해 보는게 좋을 것 같아요
KWAK-JINHO
approved these changes
Apr 15, 2025
Contributor
|
null을 처리하는데 저도 항상 고민이 많습니다 장기적으로 유지보수성을 크게 향상시키는데 중요하다고 생각해요. |
jihaneol
reviewed
Apr 15, 2025
| @Override | ||
| @Transactional | ||
| public OrderResponse createOrder(OrderRequest orderRequest) { | ||
| return createOrder(null, orderRequest); |
Contributor
There was a problem hiding this comment.
지금 보니 이렇게 user에 null이 있으면
guest라는 처리를 해주는 것도 좋겠네요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🚀 어떤 기능을 구현했나요 ?
@CurrentUser User user파라미터를 사용orderNumber와phone파라미터를 사용🔥 어떤 문제를 마주했나요 ?
✨ 어떻게 해결했나요 ?
null을 전달할 필요가 없어짐으로써null관련 버그 발생 가능성이 줄어듦📝 어떤 부분에 집중해서 리뷰해야 할까요?
📚 참고 자료 및 회고