List<List<PhysicalsPackageEntity>> physicals_package_code1 = list.stream().map(physicalsItemRecordEntity -> { String physicals_package_code = physicalsItemRecordEntity.getPhysicals_package_code(); QueryWrapper<PhysicalsPackageEntity> physicalsPackageEntityQueryWrapper = new QueryWrapper<>(); physicalsPackageEntityQueryWrapper.eq("physicals_package_code", physicals_package_code); List<PhysicalsPackageEntity> physicalsPackageEntityList = this.list(physicalsPackageEntityQueryWrapper); return physicalsPackageEntityList; }).collect(Collectors.toList());
时间: 2023-03-30 08:04:30 浏览: 73
这是一段 Java 代码,它使用了 Lambda 表达式和 Stream API,将一个 List 中的每个元素映射为一个 PhysicalsPackageEntity 对象的 List,并将结果收集到一个新的 List 中。
阅读全文