String productIds = “1,2,3”;
List sortIdList = Arrays.stream(productIds.split(","))
.map(s -> Long.parseLong(s.trim()))
.collect(Collectors.toList());
String productIds = “1,2,3”;
List sortIdList = Arrays.stream(productIds.split(","))
.map(s -> Long.parseLong(s.trim()))
.collect(Collectors.toList());