diff --git a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java index 911d7f14f..c0dc171b5 100644 --- a/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java +++ b/mall-oms/oms-boot/src/main/java/com/youlai/mall/oms/service/impl/CartServiceImpl.java @@ -87,6 +87,7 @@ public class CartServiceImpl implements ICartService { SkuInfoDTO skuInfo = skuFeignService.getSkuInfo(skuId).getData(); if (skuInfo != null) { BeanUtil.copyProperties(skuInfo,cartItem); + cartItem.setStock(skuInfo.getStockNum()); cartItem.setCount(1); cartItem.setChecked(true); }