[FIX] 구매자 - 참여 상세 정보 모집완료 상태 분철글 상태를 따르게 수정#196
Conversation
📝 WalkthroughWalkthrough참여 상세 정보에서 모집 완료 후 상태 표시가 분철글(주문) 상태를 따르도록 로직을 수정했습니다. GroupBuyPostStatus 우선순위 처리를 추가하여 모집 중일 때와 모집 완료 후의 상태 메시지를 구분합니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/java/org/sopt/poti/domain/participation/service/ParticipationDetailService.java (1)
150-170:orderStatus가 null일 때 NPE 발생 가능성이 있어요.
mapTopStatus메서드에서는 line 137-139에서orderStatus == null체크를 해주는데, 여기서는 그 체크가 빠져있어요.postStatus가RECRUITING이 아닌 상태에서orderStatus가 null이면 line 162의 switch 문에서NullPointerException이 발생해요.🐛 null 체크 추가 제안
private String determineStatusMessage( GroupBuyPostStatus postStatus, OrderStatus orderStatus ) { // 1 모집중이면 무조건 모집중 멘트를 띄움 if (postStatus == GroupBuyPostStatus.RECRUITING) { return "다른 참여자들을 기다리고 있어요"; } + // orderStatus가 null이면 메시지 없음 + if (orderStatus == null) { + return null; + } + // 2 모집 마감 이후부터는 OrderStatus 기준으로 멘트를 띄움 return switch (orderStatus) { case WAIT_PAY -> "지금 입금해주세요"; case WAIT_PAY_CHECK -> "모집자가 입금 내역을 확인하고 있어요"; case PAID, READY -> "모집자가 배송을 준비 중이에요"; case SHIPPED -> "모집자가 배송을 시작했어요"; case DELIVERED -> "거래가 종료되었어요"; default -> null; }; }
📌 관련 이슈
✨ 변경 사항
📸 테스트 증명 (필수)
📚 리뷰어 참고 사항
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.