public List<Long> test(String numberStr) {
String[] strs = orderNumberStr.split(",");
List<Long> numbers = Arrays.stream(strs).map(str -> Long.parseLong(str.trim())).collect(Collectors.toList());
return numbers ;
}
java8 String数组转Long型List
于 2021-12-07 16:11:01 首次发布