-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
거래내역 상세 조회 응답 DTO 구현
TradeService 의 거래내역 상세 조회 응답 및 삭제 메소드 구현
TradeController 의 거래내역 상세 조회 응답 및 삭제 메소드 구현
Trade 의 삭제 상태 변경 메소드 구현
Trade 삭제된 후 조회시 예외 메시지 변경
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM~~~~
if (Objects.equals(member, trade.getSeller())) { | ||
trade.deleteBySeller(); | ||
} else if (Objects.equals(member, trade.getBuyer())) { | ||
trade.deleteByBuyer(); | ||
} else { | ||
throw new AccessForbiddenException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
규철님 이렇게 하면 거래에 구매자와 판매자가 나갔다는 필드만 변경되고 둘다 삭제했을 시 레코드는 삭제 되지 않아서 데이터 공간 낭비라 생각됩니다. 제 채팅방 나가기 처럼 내가 구매자면 판매자가 나갔는지 확인하고 나갔으면 레포에서 아예삭제 안 나갔으면 필드값 변경으로 가야할 거 같습니다! 채팅방 딜리트 메소드쪽 참고 부탁드려용
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
옙!! 참고해서 수정하겠습니다
src/main/java/kr/co/fastcampus/yanabada/domain/payment/service/TradeService.java
Show resolved
Hide resolved
판매자 구매자 모두 trade 삭제 시 실제 DB 에서 거래내역 삭제
Resolves: #83
개요
거래 내역 상세 조회 및 삭제 API 구현
PR 유형
어떤 변경 사항이 있나요?
PR Checklist
PR이 다음 요구 사항을 충족하는지 확인하세요.