investorList为List集合 每个对象都包含InvestMoney属性 CommonUtils.isNumeric为判断该属性是否为数字的方法 Double sum = investorList.stream().mapToDouble(n -> CommonUtils.isNumeric(n.getInvestMoney()) ? Double.parseDouble(n.getInvestMoney()) : 0.00).summaryStatistics().getSum();