|
|
|
@ -24,6 +24,7 @@ use App\Service\v3\Interfaces\CouponRecServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\CouponServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\GoodsActivityServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\GoodsServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\InitialDeliveryServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\PaymentServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\ShopCartUpdateServiceInterface; |
|
|
|
use App\Service\v3\Interfaces\UserAddressServiceInterface; |
|
|
|
@ -93,6 +94,11 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
*/ |
|
|
|
protected $badgeService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @var InitialDeliveryServiceInterface |
|
|
|
*/ |
|
|
|
protected $initialDeliveryService; |
|
|
|
|
|
|
|
/** |
|
|
|
* 下单 |
|
|
|
* @param $marketId |
|
|
|
@ -252,6 +258,12 @@ class OrderOnlineService implements OrderOnlineServiceInterface |
|
|
|
throw new ErrorCodeException(ErrorCode::ORDER_TOTAL_AMOUNT_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
// 校验订单总金额是否满足起送
|
|
|
|
$initDeliveryAmount = $this->initialDeliveryService->get(); |
|
|
|
if ($orderAmount < $initDeliveryAmount) { |
|
|
|
throw new ErrorCodeException(ErrorCode::ORDER_NOT_ENOUGH_INITIAL_DELIVERY, "[{$initDeliveryAmount}]"); |
|
|
|
} |
|
|
|
|
|
|
|
$dataMain = [ |
|
|
|
'market_id' => $marketId, |
|
|
|
'order_num' => $globalOrderId, |
|
|
|
|