异常: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
原因:
.divide(settleAmount) 就会报上面的错,因为除不开。
解决方法:
.divide(settleAmount, 2, RoundingMode.HALF_UP));
除数是settleAmount,小数点后保留指定位数,并且进行向上取整
异常: java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.
原因:
.divide(settleAmount) 就会报上面的错,因为除不开。
解决方法:
.divide(settleAmount, 2, RoundingMode.HALF_UP));
除数是settleAmount,小数点后保留指定位数,并且进行向上取整