// 过滤list数据 List<SysUser> newList = list.stream().filter(rs -> "companyCode".equals(rs.getCompanyCode()) && StringUtils.isNotBlank(rs.getEmail())).collect(Collectors.toList()); // list数据并转array DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); String[] arr = list.stream().map(s->s.getStartDate().format(df)).toArray(String[]::new)) // 过滤list数据并转array Double[] arr = list.stream() .filter(rs -> "email".equals(rs.getEmail()) && StringUtils.isNotBlank(rs.getEmail())) .map(SysUser:: getEmail).toArray(String[] :: new)