调整下单前置校验
This commit is contained in:
parent
0c0432f01f
commit
ebac1ec22b
@ -77,9 +77,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
|||||||
//检查商品类型, 活动商品只能单独购买
|
//检查商品类型, 活动商品只能单独购买
|
||||||
$allowDelivery = true;
|
$allowDelivery = true;
|
||||||
foreach ($merchantCartList as $merchantCart) {
|
foreach ($merchantCartList as $merchantCart) {
|
||||||
|
|
||||||
if (($merchantCart['type_id'] != Merchant::TypeSupplyChain) && $address) {
|
if (($merchantCart['type_id'] != Merchant::TypeSupplyChain) && $address) {
|
||||||
if ($merchantCart['street_id'] != $address['street_code'] && $createOrder) {
|
if ($merchantCart['street_id'] != $address['street_code'] && $createOrder && !in_array($merchantCart['mer_id'], $takes)) {
|
||||||
throw new ValidateException('不支持跨区域购买,请在【我的】-【地址管理】更改后重新购买');
|
throw new ValidateException('不支持跨区域购买,请在【我的】-【地址管理】更改后重新购买');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -352,6 +352,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
$merchantRepo->forceMargin = false;
|
$merchantRepo->forceMargin = false;
|
||||||
[$_payCityPrice, $finance, $increase] = $merchantRepo->autoMargin($_payPrice, $order, $finance, $financeSn, $i++);
|
[$_payCityPrice, $finance, $increase] = $merchantRepo->autoMargin($_payPrice, $order, $finance, $financeSn, $i++);
|
||||||
}
|
}
|
||||||
|
if (isset($_payCityPrice)) {
|
||||||
$finance[] = [
|
$finance[] = [
|
||||||
'order_id' => $order->order_id,
|
'order_id' => $order->order_id,
|
||||||
'order_sn' => $order->order_sn,
|
'order_sn' => $order->order_sn,
|
||||||
@ -368,6 +369,7 @@ class StoreOrderRepository extends BaseRepository
|
|||||||
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payCityPrice);
|
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payCityPrice);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//计算手续费
|
//计算手续费
|
||||||
$_order_rate = bcsub($order->pay_price, $_payPrice, 2);
|
$_order_rate = bcsub($order->pay_price, $_payPrice, 2);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user