zoujiajian 2 rokov pred
rodič
commit
7e918ecb1c

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/mange/impl/CmsOrderDonServiceImpl.java

@@ -921,11 +921,11 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
         }
         //默认补差价余额
         String refundType = Optional.ofNullable(orderRefundReq.getRefundType()).orElse("balance");
+        BigDecimal refundMoney = orderRefundReq.getRefundMoney();
         if ("money".equals(refundType)) {
             if (orderDon.getMoney().compareTo(BigDecimal.ZERO) == 0) {
                 throw BusinessRuntimeException.getInstance("该订单为0元订单,无法补差价至用户账户");
             }
-            BigDecimal refundMoney = orderRefundReq.getRefundMoney();
             if (refundMoney == null || refundMoney.compareTo(BigDecimal.ZERO) <= 0) {
                 throw BusinessRuntimeException.getInstance("请输入正确的差价金额");
             }
@@ -947,7 +947,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
             refundRecord(orderDon, goodsDon, sku, outNo, refundType);
             return;
         }
-        BigDecimal refundBalance = orderRefundReq.getRefundBalance();
+        BigDecimal refundBalance = refundMoney;
         if (refundBalance == null || refundBalance.compareTo(BigDecimal.ZERO) <= 0 || refundBalance.compareTo(orderDon.getMoney()) > 0) {
             throw BusinessRuntimeException.getInstance("请输入正确的差价金额");
         }