Browse Source

update 特权减免金额不能大于总金额

周箭河 4 years ago
parent
commit
40c2127e12

+ 3 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRepairServiceImpl.java

@@ -432,6 +432,9 @@ public class StudentRepairServiceImpl extends BaseServiceImpl<Integer, StudentRe
             }
         }
         amount = amount.subtract(repairInfo.getExemptionAmount());
+        if (amount.compareTo(BigDecimal.ZERO) < 0) {
+            throw new BizException("特权减免金额不能大于总金额");
+        }
 
         repairInfo.setPayStatus(1);
         String channelType = "";