Skip to content
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

거래 내역 상세 조회 및 삭제 API 구현 #85

Merged
merged 8 commits into from
Jan 17, 2024

Conversation

Hwang-Kyu-Cheol
Copy link
Contributor

Resolves: #83

개요

거래 내역 상세 조회 및 삭제 API 구현

PR 유형

어떤 변경 사항이 있나요?

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

PR Checklist

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

  • 커밋 메시지 컨벤션에 맞게 작성했습니다. Commit message convention 참고 (Ctrl + 클릭하세요.)
  • 변경 사항에 대한 테스트를 했습니다.(버그 수정/기능에 대한 테스트)

거래내역 상세 조회 응답 DTO 구현
TradeService 의 거래내역 상세 조회 응답 및 삭제 메소드 구현
TradeController 의 거래내역 상세 조회 응답 및 삭제 메소드 구현
Trade 의 삭제 상태 변경 메소드 구현
Trade 삭제된 후 조회시 예외 메시지 변경
Copy link
Contributor

@Programmer-may Programmer-may left a comment

Choose a reason for hiding this comment

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

LGTM~~~~

Comment on lines +143 to +148
if (Objects.equals(member, trade.getSeller())) {
trade.deleteBySeller();
} else if (Objects.equals(member, trade.getBuyer())) {
trade.deleteByBuyer();
} else {
throw new AccessForbiddenException();
Copy link
Contributor

Choose a reason for hiding this comment

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

규철님 이렇게 하면 거래에 구매자와 판매자가 나갔다는 필드만 변경되고 둘다 삭제했을 시 레코드는 삭제 되지 않아서 데이터 공간 낭비라 생각됩니다. 제 채팅방 나가기 처럼 내가 구매자면 판매자가 나갔는지 확인하고 나갔으면 레포에서 아예삭제 안 나갔으면 필드값 변경으로 가야할 거 같습니다! 채팅방 딜리트 메소드쪽 참고 부탁드려용

Copy link
Contributor Author

Choose a reason for hiding this comment

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

옙!! 참고해서 수정하겠습니다

판매자 구매자 모두 trade 삭제 시 실제 DB 에서 거래내역 삭제
@Hwang-Kyu-Cheol Hwang-Kyu-Cheol merged commit c2a7f44 into develop Jan 17, 2024
2 checks passed
@Hwang-Kyu-Cheol Hwang-Kyu-Cheol deleted the feature/83 branch January 17, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

거래내역 상세 조회 및 삭제 API 구현
3 participants