소스 검색

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);