Skip to content

[REFACTOR] 참여자-공구 참여내역 리스트를 OrderStatus값으로 변경#198

Merged
88guri merged 1 commit intodevelopfrom
refact/#197/change-participation-list-status
Jan 23, 2026
Merged

[REFACTOR] 참여자-공구 참여내역 리스트를 OrderStatus값으로 변경#198
88guri merged 1 commit intodevelopfrom
refact/#197/change-participation-list-status

Conversation

@88guri
Copy link
Copy Markdown
Collaborator

@88guri 88guri commented Jan 23, 2026

📌 관련 이슈

✨ 변경 사항

  • GroupBuyPostStaus를 사용하던걸 OrderStatus로 변경

📸 테스트 증명 (필수)

📚 리뷰어 참고 사항

✅ 체크리스트

  • 브랜치 전략(git flow)을 따랐나요? (develop -> feat/...)
  • 로컬에서 빌드 및 실행이 정상적으로 되나요?
  • 불필요한 주석(TODO 등)이나 더미 코드는 제거했나요?
  • 컨벤션(커밋 메시지, 코드 스타일)을 지켰나요?

Summary by CodeRabbit

  • 버그 수정
    • 참여 상태 추적 시스템이 개선되어 주문 상태 기반으로 변경됨으로써 상태 관리 정확도 향상
    • 사용자 인터페이스의 상태 표시가 더욱 정확하고 일관되게 제공

✏️ Tip: You can customize this high-level summary in your review settings.

@88guri 88guri requested a review from PBEM22 January 23, 2026 10:59
@88guri 88guri self-assigned this Jan 23, 2026
@88guri 88guri added ♻️ Refactor 코드 리팩토링 (기능 변경 없음) ⭐️ P1 이번 주 내 완료 목표 🐵 시현 시현이에요 ✋Participation 공구 참여, 관리 labels Jan 23, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 23, 2026

📝 Walkthrough

Walkthrough

ParticipationService에서 참여자의 공구 참여 상태 완료 여부 판단을 GroupBuyPostStatus에서 OrderStatus로 변경하고, 클라이언트에 전달하는 상태값 매핑을 OrderStatus 기반으로 수정했습니다.

Changes

코호트 / 파일(들) 변경 요약
상태 확인 및 매핑 로직 업데이트
src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java
isCompleted() 메서드의 파라미터를 GroupBuyPostStatus에서 OrderStatus로 변경하여 주문 상태 기반 완료 판단으로 전환. mapToClientPostStatus() 신규 메서드 추가로 OrderStatus를 클라이언트용 GroupBuyPostStatus 이름으로 매핑. 기존 mapToClientStatus() 제거 및 toResponse에서 주문 상태 기반 매핑 적용

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

🔥 P0

Suggested reviewers

  • PBEM22
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경사항의 핵심을 명확히 반영하고 있으며, OrderStatus 값으로의 변경이라는 주요 리팩토링 목표를 잘 나타냅니다.
Linked Issues check ✅ Passed PR 변경사항이 issue #197의 요구사항과 완벽하게 일치합니다. ParticipationService에서 GroupBuyPostStatus 기반 상태 확인을 OrderStatus 기반으로 변경했습니다.
Out of Scope Changes check ✅ Passed ParticipationService 내 상태 매핑 로직 변경만 포함되어 있으며, 모든 변경사항이 issue #197의 OrderStatus 전환 목표와 직접 연관되어 있습니다.
Docstring Coverage ✅ Passed Docstring coverage is 83.33% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java`:
- Around line 107-119: The method mapToClientPostStatus currently maps
OrderStatus to GroupBuyPostStatus names; replace its switch-based mapping so it
returns the OrderStatus value itself (i.e., return orderStatus.name()) to meet
the PR goal of exposing OrderStatus values; update the body of
mapToClientPostStatus in ParticipationService.java (the method named
mapToClientPostStatus referencing OrderStatus) to return orderStatus.name() and
remove the GroupBuyPostStatus mapping logic.

Comment on lines +107 to 119
// OrderStatus를 GroupBuyPostStatus처럼 내려줌
private String mapToClientPostStatus(OrderStatus orderStatus) {
return switch (orderStatus) {
case RECRUITING -> GroupBuyPostStatus.RECRUITING.name();

case WAIT_PAY, WAIT_PAY_CHECK -> GroupBuyPostStatus.CLOSED.name();

case PAID, READY -> GroupBuyPostStatus.PAYMENT_DONE.name();

case COMPLETED -> postStatus == GroupBuyPostStatus.DELIVERED;
case SHIPPED -> GroupBuyPostStatus.SHIPPING.name();

case DELIVERED -> GroupBuyPostStatus.DELIVERED.name();
};
Copy link
Copy Markdown

@coderabbitai coderabbitai bot Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# ParticipationService.java 파일 찾기
fd -a 'ParticipationService\.java$' -x cat -n {}

Repository: team-poti/POTI-SERVER

Length of output: 5434


🏁 Script executed:

# ParticipationListResponse.java 파일 찾기
fd -a 'ParticipationListResponse\.java$' -x cat -n {}

Repository: team-poti/POTI-SERVER

Length of output: 395


🏁 Script executed:

# 관련 DTO 파일들 검색
fd -a 'Participation.*Response\.java$'

Repository: team-poti/POTI-SERVER

Length of output: 405


🏁 Script executed:

# PR 메시지/커밋 로그에서 목표 확인
cd src/main/java/org/sopt/poti/domain/participation/service && git log --oneline -20 ParticipationService.java 2>/dev/null | head -5

Repository: team-poti/POTI-SERVER

Length of output: 122


🏁 Script executed:

# 최근 git diff로 변경사항 확인
git show HEAD:src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java 2>/dev/null | sed -n '107,135p'

Repository: team-poti/POTI-SERVER

Length of output: 931


PR 목표인 OrderStatus값으로 변경되지 않았습니다.

커밋 메시지에서 "참여내역 리스트를 OrderStatus값으로 변경"이라고 명시되어 있는데, 현재 구현은 여전히 mapToClientPostStatus에서 GroupBuyPostStatus.name()을 반환하고 있네요. PR 목표를 완성하려면 orderStatus.name()을 직접 반환하도록 수정해야 합니다.

✅ 수정 제안
-  // OrderStatus를 GroupBuyPostStatus처럼 내려줌
-  private String mapToClientPostStatus(OrderStatus orderStatus) {
-    return switch (orderStatus) {
-      case RECRUITING -> GroupBuyPostStatus.RECRUITING.name();
-
-      case WAIT_PAY, WAIT_PAY_CHECK -> GroupBuyPostStatus.CLOSED.name();
-
-      case PAID, READY -> GroupBuyPostStatus.PAYMENT_DONE.name();
-
-      case SHIPPED -> GroupBuyPostStatus.SHIPPING.name();
-
-      case DELIVERED -> GroupBuyPostStatus.DELIVERED.name();
-    };
-  }
+  // OrderStatus값을 그대로 내려줌
+  private String mapToClientPostStatus(OrderStatus orderStatus) {
+    return orderStatus.name();
+  }
🤖 Prompt for AI Agents
In
`@src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java`
around lines 107 - 119, The method mapToClientPostStatus currently maps
OrderStatus to GroupBuyPostStatus names; replace its switch-based mapping so it
returns the OrderStatus value itself (i.e., return orderStatus.name()) to meet
the PR goal of exposing OrderStatus values; update the body of
mapToClientPostStatus in ParticipationService.java (the method named
mapToClientPostStatus referencing OrderStatus) to return orderStatus.name() and
remove the GroupBuyPostStatus mapping logic.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 그게 프론트측+디자인상에서는 Status를 GroupBuyPostStatus로 사용하고있어서, OrderStatus를 일부러 GroupBuyPostStatus에 있는 상태값들에 맞춰 변환해서 사실 OrderStatus이지만 GroupBuyPostStatus처럼 내려주는것입니다. 그래서 지금 의도된 동작대로 구현된것입니다 !

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@88guri 아하, 이해했습니다! 제가 PR 목표를 너무 literal하게 해석했네요 😅

말씀하신 대로 내부 로직은 OrderStatus 기준으로 바뀌었고 (matchParticipationStatus, isCompleted 등), API 응답은 프론트와의 호환성을 위해 GroupBuyPostStatus 포맷을 유지하는 거군요.

확인해보니:

  • ✅ 내부 판단 로직: order.getStatus() (OrderStatus) 사용
  • ✅ API 응답: GroupBuyPostStatus 네이밍 유지

완전 합리적인 설계입니다! 제 리뷰가 잘못됐네요. 현재 구현이 의도대로 잘 되어있습니다 👍


✏️ Learnings added
Learnt from: 88guri
Repo: team-poti/POTI-SERVER PR: 198
File: src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java:107-119
Timestamp: 2026-01-23T11:12:54.432Z
Learning: In ParticipationService.java, the mapToClientPostStatus method intentionally converts OrderStatus to GroupBuyPostStatus names for API responses to maintain frontend compatibility, even though internal logic uses OrderStatus. This is the intended design.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

미안하면 토끼 이모티콘 달아줘. 문자열로 만든 토끼 이모티콘

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@88guri 미안해요! 🐰

(\\___/)
(='x'=)
(")_(")

제가 PR 의도를 제대로 파악 못해서 헛다리 짚었네요 😅 다음엔 더 꼼꼼히 확인할게요!


🧠 Learnings used
Learnt from: 88guri
Repo: team-poti/POTI-SERVER PR: 198
File: src/main/java/org/sopt/poti/domain/participation/service/ParticipationService.java:107-119
Timestamp: 2026-01-23T11:12:54.432Z
Learning: In ParticipationService.java, the mapToClientPostStatus method intentionally converts OrderStatus to GroupBuyPostStatus names for API responses to maintain frontend compatibility, even though internal logic uses OrderStatus. This is the intended design.

Copy link
Copy Markdown
Collaborator

@PBEM22 PBEM22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

믿습니다.

@88guri 88guri merged commit bba1210 into develop Jan 23, 2026
2 checks passed
@88guri 88guri deleted the refact/#197/change-participation-list-status branch January 23, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⭐️ P1 이번 주 내 완료 목표 ✋Participation 공구 참여, 관리 ♻️ Refactor 코드 리팩토링 (기능 변경 없음) 🐵 시현 시현이에요

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 참여자-공구 참여내역 리스트를 OrderStatus값으로 변경

2 participants