版权声明:本文为博主原创文章,未经博主允许不得转载。 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());
});