Browse Source

购物车

master
Lemon 5 years ago
parent
commit
05dc5bfca3
  1. 8
      app/Service/v3/Implementations/ShopCartUpdateService.php
  2. 1
      config/autoload/dependencies.php

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

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

1
config/autoload/dependencies.php

@ -61,7 +61,6 @@ return [
\App\Service\v3\Interfaces\TabsServiceInterface::class => \App\Service\v3\Implementations\TabsService::class,
\App\Service\v3\Interfaces\LocationServiceInterface::class => \App\Service\v3\Implementations\LocationService::class,
\App\Service\v3\Interfaces\GoodsActivityServiceInterface::class => \App\Service\v3\Implementations\GoodsActivityService::class,
\App\Service\v3\Interfaces\DeliveryMoneyServiceInterface::class => \App\Service\v3\Implementations\DeliveryMoneyService::class,
\App\Service\v3\Interfaces\RevenueListServiceInterface::class => \App\Service\v3\Implementations\RevenueListService::class,
\App\Service\v3\Interfaces\CouponRecServiceInterface::class => \App\Service\v3\Implementations\CouponRecService::class,
\App\Service\v3\Interfaces\PaymentServiceInterface::class => \App\Service\v3\Implementations\PaymentService::class,

Loading…
Cancel
Save