关于LIst<Integer>转String的三种方式
List<Integer> typeKey = pointImageMapper.selectPointByKey(rows.get(i).getPointKey());
Integer[] typeKeyS = new Integer[typeKey.size()];
for (int j = 0; j < typeKey.size(); j++) {
typeKeyS[j] = typeKey.get(j);
}
//第一种比较累
String joins = StringUtils.join(typeKeyS, ",");
//第二种比较简洁
Joiner.on(",").join(typeKey);
//第三种用流的形式,直接将integer转换为String
typeKey.stream().map(String::valueOf).collect( Collectors.joining(","));