更改商品bug
This commit is contained in:
@@ -73,6 +73,17 @@ public class ListUtil {
|
||||
return stringList;
|
||||
}
|
||||
|
||||
public static List<Integer> stringChangeIntegerList(String listString){
|
||||
// 使用Fastjson将JSON字符串转换为JSONArray对象
|
||||
|
||||
listString = listString.replaceAll("\"", "").replaceAll("\\[", "").replaceAll("\\]", "");
|
||||
List<Integer> integerList = Stream.of(listString.split(","))
|
||||
.map(Integer::valueOf)
|
||||
.collect(Collectors.toList());
|
||||
return integerList;
|
||||
}
|
||||
|
||||
|
||||
public static List<Integer> stringChangeIntegerList(List<String> listString){
|
||||
|
||||
// method1 创建一个Integer类型的集合,循环遍历String类型的数组并把数据添加进集合
|
||||
|
||||
Reference in New Issue
Block a user