Browse Source

Merge branch 'phoenix' of ssh://120.24.33.109:11022/hyzjshwo/lanzu_api_hyperf into phoenix

master
weigang 5 years ago
parent
commit
2fc87b4822
  1. 6
      app/Service/v3/Implementations/ShopCartUpdateService.php

6
app/Service/v3/Implementations/ShopCartUpdateService.php

@ -34,11 +34,17 @@ class ShopCartUpdateService implements ShopCartUpdateServiceInterface
$builder = GoodsActivity::query();
$goodsType = GoodsActivity::class;
$goods = $builder->find($goodsId);
if(empty($goods)){
throw new ErrorCodeException(ErrorCode::GOODS_NOT_EXISTS);
}
$goodsCheck = $this->goodsActivityService->check($goods,$num,$userId);
}else{
$builder = Goods::query();
$goodsType = Goods::class;
$goods = $builder->find($goodsId);
if(empty($goods)){
throw new ErrorCodeException(ErrorCode::GOODS_NOT_EXISTS);
}
$goodsCheck = $this->goodsService->check($goods,$num);
}
if(empty($goods)){

Loading…
Cancel
Save