Skip to content

Commit

Permalink
fix: Feign통신 @RequestBody List로 복원
Browse files Browse the repository at this point in the history
  • Loading branch information
binarywoo27 committed Jan 20, 2024
1 parent 77cf757 commit 1ffc490
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public CommonResponse<LocalDateTime> payApprove(
}

@PostMapping("/paymentInfo")
CommonResponse<PaymentInfoMapDto> getPaymentInfo(@RequestBody PaymentInfoRequestDto requestDto ){
return CommonResponse.success(paymentService.getPaymentInfo(requestDto));
CommonResponse<PaymentInfoMapDto> getPaymentInfo(@RequestBody List<String> orderGroupIds ){
return CommonResponse.success(paymentService.getPaymentInfo(orderGroupIds));
}

@GetMapping(value = "/paymentDate")
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/kr/bb/payment/service/PaymentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ public void saveDeliveryIds(Map<Long, Long> oldDeliveryIdsMap, List<Long> newDel
}

@Transactional
public PaymentInfoMapDto getPaymentInfo(PaymentInfoRequestDto requestDto ) {
List<Payment> allPaymentsByOrderIds = paymentRepository.findAllByOrderIds(requestDto.getOrderGroupIds());
public PaymentInfoMapDto getPaymentInfo(List<String> orderGroupIds ) {
List<Payment> allPaymentsByOrderIds = paymentRepository.findAllByOrderIds(orderGroupIds);
Map<String, PaymentInfoDto> paymentInfoDtoMap = allPaymentsByOrderIds.stream()
.map(
payment -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class PaymentServiceTest {
@Autowired private PaymentService paymentService;
@Test
void getPaymentInfoTest(){
PaymentInfoMapDto paymentInfoMapDto = paymentService.getPaymentInfo(PaymentInfoRequestDto.builder().orderGroupIds(List.of("임시주문번호")).build());
PaymentInfoMapDto paymentInfoMapDto = paymentService.getPaymentInfo(List.of("임시주문번호"));
assertThat(paymentInfoMapDto.getPaymentInfoDtoMap().size()).isEqualTo(0);
}

Expand Down

0 comments on commit 1ffc490

Please sign in to comment.