Skip to content

Commit

Permalink
refactor: 주문 상태 변경 시 은행 이름 관련 예외 처리 추가 (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
parkcoldroad authored Jun 6, 2023
1 parent 81145d7 commit 8b4ddab
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.liberty52.product.service.controller.dto.VBankStatusModifyDto;
import com.liberty52.product.service.entity.OrderStatus;
import com.liberty52.product.service.entity.Orders;
import com.liberty52.product.service.entity.payment.BankType;
import com.liberty52.product.service.entity.payment.Payment;
import com.liberty52.product.service.entity.payment.VBankPayment;
import com.liberty52.product.service.entity.payment.VBankPayment.VBankPaymentInfo;
Expand Down Expand Up @@ -48,6 +49,8 @@ private void validateOrderStatus(OrderStatus requestedStatus, OrderStatus curren
@Override
public void modifyOrderStatusOfVBankByAdmin(String role, String orderId, VBankStatusModifyDto dto) {
Validator.isAdmin(role);
BankType.getBankType(dto.getDepositorBank());

Orders order = ordersRepository.findById(orderId)
.orElseThrow(() -> new OrderNotFoundByIdException(orderId));

Expand Down

0 comments on commit 8b4ddab

Please sign in to comment.