commit
3fb4e488bb
@ -114,13 +114,15 @@ public class CheckDataRender implements CartRenderStep {
|
|||||||
cartSkuVO.setErrorMessage("商品库存不足,现有库存数量[" + dataSku.getQuantity() + "]");
|
cartSkuVO.setErrorMessage("商品库存不足,现有库存数量[" + dataSku.getQuantity() + "]");
|
||||||
}
|
}
|
||||||
//移除无效促销活动
|
//移除无效促销活动
|
||||||
cartSkuVO.setPromotionMap(cartSkuVO.getPromotionMap().entrySet().stream().filter(i -> {
|
if (cartSkuVO.getPromotionMap() != null && !cartSkuVO.getPromotionMap().isEmpty()) {
|
||||||
BasePromotions basePromotions = (BasePromotions) i.getValue();
|
cartSkuVO.setPromotionMap(cartSkuVO.getPromotionMap().entrySet().stream().filter(i -> {
|
||||||
if (basePromotions.getStartTime() != null && basePromotions.getEndTime() != null) {
|
BasePromotions basePromotions = (BasePromotions) i.getValue();
|
||||||
return basePromotions.getStartTime().getTime() <= System.currentTimeMillis() && basePromotions.getEndTime().getTime() >= System.currentTimeMillis();
|
if (basePromotions.getStartTime() != null && basePromotions.getEndTime() != null) {
|
||||||
}
|
return basePromotions.getStartTime().getTime() <= System.currentTimeMillis() && basePromotions.getEndTime().getTime() >= System.currentTimeMillis();
|
||||||
return true;
|
}
|
||||||
}).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
|
return true;
|
||||||
|
}).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user