版權聲明:本文為部落客原創文章,未經部落客允許不得轉載。 https://blog.csdn.net/qq_34173549/article/details/81358843
List<Long> idList = Arrays.stream(StringUtils.split(ids, ","))
.map(id -> Long.parseLong(id.trim()))
.collect(Collectors.toList());
List<Object> categoryList = new ArrayList<>();
getAllCategoryResponse.getCategoryList().forEach(byteString -> {
categoryList.add(byteString.toStringUtf8());
});