-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 OrderType 제거 및 Feign client 요청 처리 추가
- Loading branch information
1 parent
f91d25d
commit 4f699e7
Showing
10 changed files
with
82 additions
and
28 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 was deleted.
Oops, something went wrong.
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/kr/bb/payment/repository/PaymentRepository.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,8 +1,12 @@ | ||
package kr.bb.payment.repository; | ||
|
||
import java.util.List; | ||
import kr.bb.payment.entity.Payment; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
public interface PaymentRepository extends JpaRepository<Payment, Long> { | ||
Payment findByOrderId(String orderId); | ||
@Query("select p from Payment p where p.orderId = :orderIds") | ||
List<Payment> findAllByOrderIds(List<String> orderIds); | ||
} |
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
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
27 changes: 27 additions & 0 deletions
27
src/test/java/kr/bb/payment/service/PaymentServiceTest.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,27 @@ | ||
package kr.bb.payment.service; | ||
|
||
import static org.assertj.core.api.AssertionsForClassTypes.assertThat; | ||
|
||
import bloomingblooms.domain.payment.PaymentInfoDto; | ||
import java.util.List; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
@SpringBootTest | ||
@Transactional | ||
public class PaymentServiceTest { | ||
@Autowired private PaymentService paymentService; | ||
@Test | ||
void getPaymentInfoTest(){ | ||
List<PaymentInfoDto> paymentInfo = paymentService.getPaymentInfo(List.of("임시주문번호")); | ||
assertThat(paymentInfo.size()).isEqualTo(0); | ||
} | ||
|
||
@Test | ||
void getPaymentDateTest(){ | ||
String paymentDate = paymentService.getPaymentDate("임시주문번호"); | ||
assertThat(paymentDate).isEmpty(); | ||
} | ||
} |