1、计算总金额 BigDecimal amountTotal = list.stream().map(UserPayInfo::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);