...
|
...
|
@@ -597,27 +597,8 @@ public class ProductController { |
|
|
if (CollectionUtils.isNotEmpty(productIdList)) {
|
|
|
for (Integer productId : productIdList) {
|
|
|
LOG.info("Batch clearCache queryProductDetailById productId = {}, ", productId);
|
|
|
storagePriceService.publishPriceUpdateEventWithDeleteCache(productId);
|
|
|
// storagePriceService.publishPriceUpdateEventIf(productId, oldSkupList -> {
|
|
|
// // 缓存不存在,需要更新
|
|
|
// if (CollectionUtils.isEmpty(oldSkupList)) {
|
|
|
// return true;
|
|
|
// }
|
|
|
// // 比最低价要低,需要更新
|
|
|
// Predicate<StoragePrice> pricePredicate = newPrice -> oldSkupList.stream()
|
|
|
// .filter(oldPrice -> Objects.equals(newPrice.getStorageId(), oldPrice.getStorageId()))
|
|
|
// .anyMatch(oldPrice -> newPrice.getPrice().compareTo(oldPrice.getPrice()) < 0);
|
|
|
// if(storagePriceList.stream().anyMatch(pricePredicate)){
|
|
|
// return true;
|
|
|
// }
|
|
|
// // 如果当前skup为缓存中商品,需要更新
|
|
|
// Predicate<StoragePrice> sameSkupPredicate = newSkup -> oldSkupList.stream()
|
|
|
// .anyMatch(oldSkup -> Objects.equals(newSkup.getSkup(), oldSkup.getSkup()));
|
|
|
// if(storagePriceList.stream().anyMatch(sameSkupPredicate)){
|
|
|
// return true;
|
|
|
// }
|
|
|
// return false;
|
|
|
// });
|
|
|
|
|
|
storagePriceService.publishPriceUpdateEventOfClearCache(productId);
|
|
|
|
|
|
//商品详情
|
|
|
cacheAop.clearCache(
|
...
|
...
|
|