Commit 802eb010 by 周晓航

商品库存服务查询失败, 或者 数量为null 不校验库存

Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent 9c1fb75a
......@@ -2369,7 +2369,11 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
requestDto.setProductIds(productIds);
GetProductStockResponseDto availableStocks = stockClient.getAvailableStocks(requestDto);
// 商品服务 返回null 或者 qty=null 表示不限制库存
if (Objects.isNull(availableStocks) || Objects.isNull(availableStocks.getResult().get(0).getQty())) {
if (Objects.isNull(availableStocks)) {
return;
}
List<GetProductStockResponseDto.DataBean> result = availableStocks.getResult();
if (CollectionUtils.isNotEmpty(result) || Objects.isNull(result.get(0).getQty())) {
return;
}
if (!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(availableStocks.getCode())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment