mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
fix(CartServiceImpl.java): 添加商品至购物车先判断商品是否存在
This commit is contained in:
parent
7416728e24
commit
f5429c463a
@ -87,7 +87,9 @@ public class CartServiceImpl implements ICartService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
CompletableFuture.allOf(cartItemCompletableFuture).join();
|
CompletableFuture.allOf(cartItemCompletableFuture).join();
|
||||||
cartHashOperations.put(hKey,cartItem);
|
|
||||||
|
Assert.isTrue(cartItem.getSkuId() != null && cartItem.getSkuId() > 0,"商品不存在");
|
||||||
|
cartHashOperations.put(hKey, cartItem);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user