Commit e77b9fb8 authored by 周健威's avatar 周健威

解决重复问题

parent b3c0c1fe
...@@ -36,7 +36,7 @@ public class RscpImagePriceController extends BaseController<RscpImagePriceBiz, ...@@ -36,7 +36,7 @@ public class RscpImagePriceController extends BaseController<RscpImagePriceBiz,
List<ImagePriceVO> imagePriceVOS = CollUtil.newArrayList(); List<ImagePriceVO> imagePriceVOS = CollUtil.newArrayList();
String key = ""; String key = "";
List<String> satelliteTypes = list.parallelStream().map(RscpImagePrice::getImageSatelliteType).collect(Collectors.toList()); List<String> satelliteTypes = list.parallelStream().map(RscpImagePrice::getImageSatelliteType).distinct().collect(Collectors.toList());
for(String satelliteType : satelliteTypes) { for(String satelliteType : satelliteTypes) {
List<RscpImagePrice> imagePriceList = list.parallelStream().filter(rscpImagePrice -> satelliteType.equals(rscpImagePrice.getImageSatelliteType())).collect(Collectors.toList()); List<RscpImagePrice> imagePriceList = list.parallelStream().filter(rscpImagePrice -> satelliteType.equals(rscpImagePrice.getImageSatelliteType())).collect(Collectors.toList());
imagePriceVOS.add(new ImagePriceVO(){{ imagePriceVOS.add(new ImagePriceVO(){{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment