增加对商品为空的判定

This commit is contained in:
Chopper 2021-12-22 12:22:52 +08:00
parent e962a594ba
commit c0c530adad

View File

@ -226,7 +226,7 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
//从缓存拿商品Sku //从缓存拿商品Sku
GoodsSku goodsSku = this.getGoodsSkuByIdFromCache(skuId); GoodsSku goodsSku = this.getGoodsSkuByIdFromCache(skuId);
//如果使用商品ID无法查询SKU则返回错误 //如果使用商品ID无法查询SKU则返回错误
if (goodsSku == null) { if (goodsVO == null | goodsSku == null) {
throw new ServiceException(ResultCode.GOODS_NOT_EXIST); throw new ServiceException(ResultCode.GOODS_NOT_EXIST);
} }