-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 환불 요청에 대한 검증 후 포인트 교환 - 환불 수량은 인자에서 제외했습니다 - 포인트 교환 이후 이루어질 task를 todo로 정리했습니다 * refactor: 환불에 사용되는 에러 코드 정의 - 기존에 사용된 P000 에러는 입찰과 환불 모두 사용되어 거래 시로 변경합니다 * feat: 사용자 도메인 equals 구현 - 환불 요청 사용자와 거래 내역의 사용자가 동일한 지 검증하기 위해 재정의합니다 * test: 환불 메서드의 테스트 코드 스켈레톤 작성 * refactor: 코드 정렬 및 경매 취소 인터페이스 정의 - todo로 넘긴 입찰 취소 요청, 정보 저장을 뼈대 코드로 구현했습니다 - 입찰 취소 요청 시 거래 내역이 경매 id를 보내줘야 하므로 필드에 추가했습니다 * refactor: 이미 환불된 거래 내역 검증 로직 구현 - 이미 환불된 내역일 경우의 예외를 추가했습니다 * refactor: 식별자인 로그인 아이디로 동일성 검증 - signInId를 통한 동일성 검증으로 변경했습니다 * test: 사용자 동일성 검증, 거래 내역 환불 상태 검증 테스트 추가
- Loading branch information
1 parent
7c074b0
commit 74dae60
Showing
9 changed files
with
172 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/com/wootecam/luckyvickyauction/core/payment/domain/BidHistoryRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package com.wootecam.luckyvickyauction.core.payment.domain; | ||
|
||
import java.util.Optional; | ||
|
||
public interface BidHistoryRepository { | ||
|
||
BidHistory save(BidHistory bidHistory); | ||
|
||
Optional<BidHistory> findById(long bidHistoryId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/java/com/wootecam/luckyvickyauction/core/payment/domain/BidHistoryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.wootecam.luckyvickyauction.core.payment.domain; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
public class BidHistoryTest { | ||
|
||
@Test | ||
void 거래_내역이_환불_상태인지_확인할_수_있다() { | ||
// given | ||
BidHistory refundBidHistory = BidHistory.builder() | ||
.bidStatus(BidStatus.REFUND) | ||
.build(); | ||
|
||
// when | ||
boolean isRefundStatus = refundBidHistory.isRefundStatus(); | ||
|
||
// then | ||
assertThat(isRefundStatus).isTrue(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters