字符串 "1,2,3,4, ..." 转换成 List<Integer>
List<Integer> categoryids = new ArrayList<>();
String[] idsArr = StringUtils.split(categoryIdsStr, ",");
try {
categoryids = Arrays.stream(idsArr)
.map(s -> Integer.parseInt(s.trim())).collect(Collectors.toList()) // 转换为 List<Integer>
.stream().distinct().collect(Collectors.toList()); // 去重操作
} catch (Exception e) {
throw new DataNonConformityException();
}