购物车-修复商品被删除,获取购物车列表出错

This commit is contained in:
wuchunlei
2024-04-08 15:00:30 +08:00
parent 145e062ebe
commit 5606c3d380

View File

@@ -53,10 +53,7 @@ public class OrderCartServiceImpl extends ServiceImpl<OrderCartDao, OrderCartEnt
ShopProduct productEntity = shopProductService.getById(productId);
System.out.println("productEntity=============================="+productEntity);
// if (productEntity == null) {
// return null;
// } else {
// shopProductService.getBaseMapper().selectList()
if (productEntity != null) {
ShopCartVo shopCartVo = new ShopCartVo();
BeanUtils.copyProperties(orderCartEntity, shopCartVo);
@@ -83,10 +80,7 @@ public class OrderCartServiceImpl extends ServiceImpl<OrderCartDao, OrderCartEnt
shopCartVo.setActivityPrice(price);
cartList.add(shopCartVo);
}
// }
}
return cartList;
}