!85 修复结算时无促销报错问题

Merge pull request !85 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2021-12-22 07:40:24 +00:00 committed by Gitee
commit 3fb4e488bb

View File

@ -114,6 +114,7 @@ public class CheckDataRender implements CartRenderStep {
cartSkuVO.setErrorMessage("商品库存不足,现有库存数量[" + dataSku.getQuantity() + "]"); cartSkuVO.setErrorMessage("商品库存不足,现有库存数量[" + dataSku.getQuantity() + "]");
} }
//移除无效促销活动 //移除无效促销活动
if (cartSkuVO.getPromotionMap() != null && !cartSkuVO.getPromotionMap().isEmpty()) {
cartSkuVO.setPromotionMap(cartSkuVO.getPromotionMap().entrySet().stream().filter(i -> { cartSkuVO.setPromotionMap(cartSkuVO.getPromotionMap().entrySet().stream().filter(i -> {
BasePromotions basePromotions = (BasePromotions) i.getValue(); BasePromotions basePromotions = (BasePromotions) i.getValue();
if (basePromotions.getStartTime() != null && basePromotions.getEndTime() != null) { if (basePromotions.getStartTime() != null && basePromotions.getEndTime() != null) {
@ -123,6 +124,7 @@ public class CheckDataRender implements CartRenderStep {
}).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue))); }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
} }
} }
}
/** /**
* 店铺分组 * 店铺分组