//精简方法(java8,lambda)List<Integar> categoryTypeList = productInfoList.stream() .map(e -> e.getCategoryType()) .collection(Collectors.toList());