- A+
所属分类:Java
//这两部分效果相同
monitorCount = tableNameList.stream().mapToDouble(tableName -> multiSourceMapper.getCountByMonitorTableName((String) tableName, wrapper)).sum();
for (Object tableName : tableNameList) {
monitorCount = monitorCount + multiSourceMapper.getCountByMonitorTableName((String) tableName, wrapper);
}