fix: 增加获取购物车商品日志,修复可能出现的获取购物车空指针问题

This commit is contained in:
misworga831 2023-01-13 14:37:13 +08:00
parent 5d6b475e09
commit 96a9a32079

View File

@ -111,7 +111,7 @@ public class CheckDataRender implements CartRenderStep {
Map<String, Object> promotionMap = promotionGoodsService.getCurrentGoodsPromotion(dataSku, tradeDTO.getCartTypeEnum().name());
//商品有效性判定
log.info("dataSku: {}, goodsSku: {}", dataSku, cartSkuVO.getGoodsSku());
if (dataSku == null || cartSkuVO.getGoodsSku() == null || dataSku.getUpdateTime().after(cartSkuVO.getGoodsSku().getUpdateTime())) {
if (dataSku == null || (dataSku.getUpdateTime() != null && dataSku.getUpdateTime().after(cartSkuVO.getGoodsSku().getUpdateTime()))) {
//商品失效,将商品移除并重新填充商品
cartSkuVOS.remove(cartSkuVO);
//设置新商品