!19 新增购物车时,SkuInfo库存字段和CartItemDto库存字段不一致,导致前端购物车无法修改数量

Merge pull request !19 from Fxz/master
This commit is contained in:
郝先瑞 2022-05-17 12:10:54 +00:00 committed by Gitee
commit b2ff71c699
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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);
}