商品 添加称重商品 和 套餐商品
This commit is contained in:
@@ -102,10 +102,13 @@ public class ListUtil {
|
||||
}
|
||||
|
||||
|
||||
public static<T> String listChangeString(List<T> listString){
|
||||
return listString.stream()
|
||||
.map(Object::toString)
|
||||
.collect(Collectors.joining(", "));
|
||||
public static <T> String listToJsonString(List<T> list) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
try {
|
||||
return objectMapper.writeValueAsString(list);
|
||||
} catch (JsonProcessingException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static String mapToString(Map<String, String> map) {
|
||||
|
||||
Reference in New Issue
Block a user