|
@@ -528,7 +528,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -528,7 +528,7 @@ public class ProductServiceImpl implements ProductService { |
528
|
if (productId == null) {
|
528
|
if (productId == null) {
|
529
|
return new HashMap<>();
|
529
|
return new HashMap<>();
|
530
|
}
|
530
|
}
|
531
|
- List<StoragePrice> storagePrices = storagePriceMapper.selectLeastPricesByProductId(productId);
|
531
|
+ List<StoragePrice> storagePrices = storagePriceService.selectLeastPricesByProductId(productId);
|
532
|
return storagePrices.stream().filter(price -> price.getPreSaleFlag() == 3).collect(Collectors.toMap(StoragePrice::getStorageId, StoragePrice::getPrice));
|
532
|
return storagePrices.stream().filter(price -> price.getPreSaleFlag() == 3).collect(Collectors.toMap(StoragePrice::getStorageId, StoragePrice::getPrice));
|
533
|
}
|
533
|
}
|
534
|
|
534
|
|
|
@@ -547,7 +547,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -547,7 +547,7 @@ public class ProductServiceImpl implements ProductService { |
547
|
if (product == null) {
|
547
|
if (product == null) {
|
548
|
return new ArrayList<>();
|
548
|
return new ArrayList<>();
|
549
|
}
|
549
|
}
|
550
|
- List<StoragePrice> storagePrices = storagePriceMapper.selectLeastPricesByProductId(product.getId());
|
550
|
+ List<StoragePrice> storagePrices = storagePriceService.selectLeastPricesByProductId(product.getId());
|
551
|
List<StoragePrice> storagePrices1 = storagePrices.stream().filter(s -> s.getPreSaleFlag() == 0).collect(Collectors.toList());
|
551
|
List<StoragePrice> storagePrices1 = storagePrices.stream().filter(s -> s.getPreSaleFlag() == 0).collect(Collectors.toList());
|
552
|
Map<Integer, StoragePrice> storagePriceMap = storagePrices1.stream().collect(Collectors.toMap(StoragePrice::getStorageId, Function.identity(), BinaryOperator.minBy(Comparator.comparing(StoragePrice::getPrice))));
|
552
|
Map<Integer, StoragePrice> storagePriceMap = storagePrices1.stream().collect(Collectors.toMap(StoragePrice::getStorageId, Function.identity(), BinaryOperator.minBy(Comparator.comparing(StoragePrice::getPrice))));
|
553
|
|
553
|
|
|
@@ -1018,7 +1018,7 @@ public class ProductServiceImpl implements ProductService { |
|
@@ -1018,7 +1018,7 @@ public class ProductServiceImpl implements ProductService { |
1018
|
}
|
1018
|
}
|
1019
|
|
1019
|
|
1020
|
private Map<String, StoragePrice> getStorageLeastPriceInfo(Integer productId) {
|
1020
|
private Map<String, StoragePrice> getStorageLeastPriceInfo(Integer productId) {
|
1021
|
- List<StoragePrice> storagePrices = storagePriceMapper.selectLeastPricesByProductId(productId);
|
1021
|
+ List<StoragePrice> storagePrices = storagePriceService.selectLeastPricesByProductId(productId);
|
1022
|
return storagePrices.stream()
|
1022
|
return storagePrices.stream()
|
1023
|
.collect(Collectors.toMap(s -> s.getStorageId() + "_" + s.getPreSaleFlag() + "_" + s.getRegion(), Function.identity()));
|
1023
|
.collect(Collectors.toMap(s -> s.getStorageId() + "_" + s.getPreSaleFlag() + "_" + s.getRegion(), Function.identity()));
|
1024
|
}
|
1024
|
}
|