فهرست منبع

fixed 发起退款金额校验

fushengqian 11 ماه پیش
والد
کامیت
353191cd3d
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java

+ 3 - 0
fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java

@@ -623,6 +623,9 @@ public class WeixinServiceImpl implements WeixinService {
             BigDecimal refundFee = refundAmount.multiply(new BigDecimal("100"));
             Integer totalFeeInt = totalFee.intValue();
             Integer refundFeeInt = refundFee.intValue();
+            if (refundFee.compareTo(totalFee) > 0) {
+                throw new BusinessCheckException("退款金额不能大于总金额");
+            }
 
             // 支付配置
             getApiConfig(storeId, platform);