fix: 加入购物车skuid可选
This commit is contained in:
@@ -386,7 +386,7 @@ public class CartService {
|
||||
return Result.fail("该商品不存在");
|
||||
}
|
||||
// 判断商品是否已下架
|
||||
tbProductSkuWithBLOBs = productSkuMapper.selectByPrimaryKey(Integer.valueOf(skuId));
|
||||
tbProductSkuWithBLOBs = StrUtil.isBlank(skuId) ? null: productSkuMapper.selectByPrimaryKey(Integer.valueOf(skuId));
|
||||
if (tbProductSkuWithBLOBs == null || tbProductSkuWithBLOBs.getIsGrounding().equals(0)) {
|
||||
rmCart(jsonObject, skuId, tableCartKey);
|
||||
return Result.fail("商品已下架");
|
||||
|
||||
Reference in New Issue
Block a user