Explorar o código

fixed 发起退款金额校验

fushengqian hai 11 meses
pai
achega
353191cd3d

+ 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"));
             BigDecimal refundFee = refundAmount.multiply(new BigDecimal("100"));
             Integer totalFeeInt = totalFee.intValue();
             Integer totalFeeInt = totalFee.intValue();
             Integer refundFeeInt = refundFee.intValue();
             Integer refundFeeInt = refundFee.intValue();
+            if (refundFee.compareTo(totalFee) > 0) {
+                throw new BusinessCheckException("退款金额不能大于总金额");
+            }
 
 
             // 支付配置
             // 支付配置
             getApiConfig(storeId, platform);
             getApiConfig(storeId, platform);