List<Object> ——> List<Long>

psuitj / 2024-02-21 / 原文

List<FaultReport> reportDetail = reportMapper.getReportDetail(pagePo);
List<Long> collect = reportDetail.stream().map(FaultReport::getId).collect(Collectors.toList());