1. Convert json string to list
 String blackUids = "[1,2,3,4]";
List<Long> ids = JSONObject.parseArray(blackUids, Long.class);
  1. Convert comma separated string to list
 List<Long> uids = Arrays.asList(blackListUids.split(",")).stream().map(uid -> NumberUtils.toLong(uid)).collect(Collectors.toList());
  1. convert string to array
 String[] skuIds = skuLevelBonusMergeDTO.getSkuIds().split(",")
  1. to be continued

hizengzeng
177 声望10 粉丝

hizengzeng