利用stream实现集合类型转换
//String[] -->List<String>
List<String> list = Arrays.asList(ids);
//List<String> -->List<Long>
List<Long> list = Arrays.asList(ids).stream().map(e->Long.parseLong(e.trim())).collect(Collectors.toList());
//List<Long> -->List<String>
List<String> list = ids.stream.map(String::valueOf).collect(Collectors.toList());
//String -->List<Long> 按“,”分割成String[]
List<Long> list = Arrays.asList(ids.split(StringPool.COMMA)).stream().map(e->Long.parseLong(e.trim())).collect(Collectors.toList());