Merge pull request !13 from OceansDeep/feature/pg
This commit is contained in:
commit
e38f9aa2ff
@ -190,6 +190,11 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
|
|||||||
GoodsSku goodsSku = this.getGoodsSkuByIdFromCache(skuId);
|
GoodsSku goodsSku = this.getGoodsSkuByIdFromCache(skuId);
|
||||||
|
|
||||||
GoodsVO goodsVO = goodsService.getGoodsVO(goodsId);
|
GoodsVO goodsVO = goodsService.getGoodsVO(goodsId);
|
||||||
|
if (goodsVO == null || !goodsVO.getMarketEnable().equals(GoodsStatusEnum.UPPER.name())
|
||||||
|
|| !goodsVO.getIsAuth().equals(GoodsAuthEnum.PASS.name())
|
||||||
|
|| Boolean.TRUE.equals(goodsVO.getDeleteFlag())) {
|
||||||
|
throw new ServiceException(ResultCode.GOODS_NOT_EXIST);
|
||||||
|
}
|
||||||
//如果规格为空则使用商品ID进行查询
|
//如果规格为空则使用商品ID进行查询
|
||||||
if (goodsSku == null) {
|
if (goodsSku == null) {
|
||||||
skuId = goodsVO.getSkuList().get(0).getId();
|
skuId = goodsVO.getSkuList().get(0).getId();
|
||||||
@ -198,8 +203,6 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i
|
|||||||
if (goodsSku == null) {
|
if (goodsSku == null) {
|
||||||
throw new ServiceException(ResultCode.GOODS_NOT_EXIST);
|
throw new ServiceException(ResultCode.GOODS_NOT_EXIST);
|
||||||
}
|
}
|
||||||
} else if (!goodsSku.getMarketEnable().equals(GoodsStatusEnum.UPPER.name()) || !goodsVO.getIsAuth().equals(GoodsAuthEnum.PASS.name()) || Boolean.TRUE.equals(goodsSku.getDeleteFlag())) {
|
|
||||||
throw new ServiceException(ResultCode.GOODS_NOT_EXIST);
|
|
||||||
}
|
}
|
||||||
//获取当前商品的索引信息
|
//获取当前商品的索引信息
|
||||||
EsGoodsIndex goodsIndex = goodsIndexService.findById(skuId);
|
EsGoodsIndex goodsIndex = goodsIndexService.findById(skuId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user