private void businessValidate(List<String> orderNumList, String total,
Integer schoolId, String openId) throws CustomException {
BigDecimal selectSumMoneyForOrderNumList = orderService
.selectSumMoneyForOrderNumList(orderNumList);
BigDecimal selectSumMoney = null;
BigDecimal paramSumMoney = null;
try {
log.info("==金额校验开始{}", selectSumMoneyForOrderNumList);
selectSumMoney = selectSumMoneyForOrderNumList.setScale(2,
BigDecimal.ROUND_HALF_DOWN);
log.info("==金额校验,查询到的金额{}", selectSumMoney);
paramSumMoney = new BigDecimal(total).setScale(2,
BigDecimal.ROUND_HALF_DOWN);
log.info("==金额校验,入参的金额{}", paramSumMoney);
} catch (Exception e) {
throw new CustomException("==信合支付,入参总金额校验,BigDecimal parse Error!");
}
if (!paramSumMoney.equals(selectSumMoney)) {
log.error("==信合支付校验,学校id{},用户openId{},入参总金额校验:入参总金额{},查库总金额{}",
schoolId, openId, paramSumMoney, selectSumMoney);
throw new CustomException("==信合支付,入参总金额校验不符!");
}
}