/**
* 展示出商品的名称和价格
*/
@Test
public void printMapTwo(){
Map<String,Double> mMap=new HashMap<String,Double>();
List<Sku> list2 = list.stream().sorted(Comparator.comparing(Sku::getTotalPrice)).collect(Collectors.toList());
for(Sku sku:list2){
mMap.put(sku.getSkuName(),sku.getTotalPrice());
}
System.out.println(JSONObject.toJSONString(mMap,true));
}