Skip to content

[fix] 배포 서버 오류 수정 #124

Merged
gkdudans merged 15 commits intodevelopfrom
deploy
Aug 14, 2025
Merged

[fix] 배포 서버 오류 수정 #124
gkdudans merged 15 commits intodevelopfrom
deploy

Conversation

@gkdudans
Copy link
Contributor

@gkdudans gkdudans commented Aug 14, 2025

#️⃣ Issue Number

hotfix로 배포 서버의 버그 수정 사항을 develop에 반영합니다.

📝 요약(Summary)

🛠️ PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

📸스크린샷 (선택)

💬 공유사항 to 리뷰어

✅ PR Checklist

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • 커밋 메시지 컨벤션에 맞게 작성했습니다.
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트).

Summary by CodeRabbit

  • 신기능
    • 사용자 정산 목록 조회 API 추가: /users/settlement (페이지네이션, 최근 10일 내 처리/대기 내역, 모임/금액/상태/제목/생성일 포함)
  • 변경 사항
    • 기존 사용자 정산 조회 엔드포인트(/settlements/me) 제거 및 응답 필드 구성 일부 조정
    • 결제 실패 처리 엔드포인트 비활성화(/payments/fail)
    • 결제 및 정산 처리의 안정성·오류 처리 개선(중복 처리 방지, 예외 대응 강화)

@gkdudans gkdudans requested a review from NamYeonW00 August 14, 2025 07:25
@gkdudans gkdudans self-assigned this Aug 14, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 14, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

결제 실패 엔드포인트를 비활성화하고 결제 확인 흐름과 멱등성 기준을 재구성했다. 정산의 사용자 전용 조회는 Settlement 모듈에서 제거되고 User 모듈로 이전되며 DTO/레포지토리 시그니처가 변경되었다. 신규 DTO와 페이지 응답을 추가하고, 내부 월렛 트랜잭션 저장 로직이 도입되었다.

Changes

Cohort / File(s) Summary
Payment API & Service
src/main/java/com/example/onlyone/domain/payment/controller/PaymentController.java, .../payment/service/PaymentService.java, .../payment/repository/PaymentRepository.java
/payments/fail 엔드포인트 주석 처리로 비활성화. PaymentService에서 멱등성 기준을 tossOrderId로 변경, 예외 매핑 확장, req.getAmount() 사용, WalletTransaction에 상세 정보 포함 및 Payment를 트랜잭션에 연계(영속 전이). reportFail 제거. 레포지토리에 findByTossOrderId 추가.
Settlement API/Service 리팩터링
.../settlement/controller/SettlementController.java, .../settlement/service/SettlementService.java, .../settlement/repository/UserSettlementRepository.java, .../settlement/dto/response/UserSettlementDto.java
SettlementController의 /me 조회 제거. Service에서 getMySettlementList 제거 및 정산 처리 로직을 내부 트랜잭션/저장 헬퍼로 재구성. UserSettlementRepository가 사용자 조회 메서드를 findMyRecentOrRequested(Page)로 변경하고 프로젝션 수정. UserSettlementDto에서 clubId 필드 삭제.
User 모듈로 사용자 정산 조회 이전
.../user/controller/UserController.java, .../user/service/UserService.java, .../user/dto/response/MySettlementDto.java, .../user/dto/response/MySettlementResponseDto.java
GET /users/settlement 추가(페이지네이션). UserService에 getMySettlementList(Pageable) 추가(최근 10일). MySettlementDto, MySettlementResponseDto 신규 도입으로 페이지 메타 및 리스트 응답 구성.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant UserController
  participant UserService
  participant UserSettlementRepository

  User->>UserController: GET /users/settlement?page,size,sort
  UserController->>UserService: getMySettlementList(pageable)
  UserService->>UserSettlementRepository: findMyRecentOrRequested(user, now-10d, pageable)
  UserSettlementRepository-->>UserService: Page<MySettlementDto>
  UserService-->>UserController: MySettlementResponseDto
  UserController-->>User: 200 OK (CommonResponse)
Loading
sequenceDiagram
  autonumber
  actor Client
  participant PaymentService
  participant TossClient
  participant Wallet
  participant Repo as PaymentRepository

  Client->>PaymentService: confirm(req)
  PaymentService->>Repo: findByTossOrderId(req.orderId)
  alt Already exists
    PaymentService-->>Client: throw ALREADY_COMPLETED_PAYMENT
  else New payment
    PaymentService->>TossClient: confirmPayment(req)
    TossClient-->>PaymentService: TossResponse
    PaymentService->>Wallet: create WalletTransaction(+Payment via cascade)
    Wallet-->>PaymentService: persisted
    PaymentService-->>Client: success
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Possibly related PRs

Suggested labels

Wallet, User

Suggested reviewers

  • geleego
  • ghkddlscks19
  • choigpt

Poem

토스 바람 따라 결제 길을 정리하고,
정산 길은 유저 집으로 살짝 이사했네.
지갑 토끼, 깡총깡총 트랜잭션을 기록하고,
주문키로 멱등성 딱! 접어두었지.
오늘도 코드밭에 캐럿 하나 추가! 🥕✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 14acaaf and e984701.

📒 Files selected for processing (11)
  • src/main/java/com/example/onlyone/domain/payment/controller/PaymentController.java (1 hunks)
  • src/main/java/com/example/onlyone/domain/payment/repository/PaymentRepository.java (1 hunks)
  • src/main/java/com/example/onlyone/domain/payment/service/PaymentService.java (4 hunks)
  • src/main/java/com/example/onlyone/domain/settlement/controller/SettlementController.java (0 hunks)
  • src/main/java/com/example/onlyone/domain/settlement/dto/response/UserSettlementDto.java (0 hunks)
  • src/main/java/com/example/onlyone/domain/settlement/repository/UserSettlementRepository.java (3 hunks)
  • src/main/java/com/example/onlyone/domain/settlement/service/SettlementService.java (2 hunks)
  • src/main/java/com/example/onlyone/domain/user/controller/UserController.java (2 hunks)
  • src/main/java/com/example/onlyone/domain/user/dto/response/MySettlementDto.java (1 hunks)
  • src/main/java/com/example/onlyone/domain/user/dto/response/MySettlementResponseDto.java (1 hunks)
  • src/main/java/com/example/onlyone/domain/user/service/UserService.java (4 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch deploy

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@NamYeonW00 NamYeonW00 left a comment

Choose a reason for hiding this comment

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

굿굿~~

@gkdudans gkdudans merged commit d190c50 into develop Aug 14, 2025
3 of 4 checks passed
choigpt pushed a commit that referenced this pull request Aug 28, 2025
[fix] 배포 서버 오류 수정
@coderabbitai coderabbitai bot mentioned this pull request Sep 15, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants