调整下单前置校验
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,20 +352,22 @@ 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++);
|
||||||
}
|
}
|
||||||
$finance[] = [
|
if (isset($_payCityPrice)) {
|
||||||
'order_id' => $order->order_id,
|
$finance[] = [
|
||||||
'order_sn' => $order->order_sn,
|
'order_id' => $order->order_id,
|
||||||
'user_info' => $groupOrder->user->nickname,
|
'order_sn' => $order->order_sn,
|
||||||
'user_id' => $uid,
|
'user_info' => $groupOrder->user->nickname,
|
||||||
'financial_type' => 'order_true',
|
'user_id' => $uid,
|
||||||
'financial_pm' => 0,
|
'financial_type' => 'order_true',
|
||||||
'type' => 2,
|
'financial_pm' => 0,
|
||||||
'number' => $_payCityPrice,
|
'type' => 2,
|
||||||
'mer_id' => $product_mer_id,
|
'number' => $_payCityPrice,
|
||||||
'financial_record_sn' => $financeSn . (($i++)+2)
|
'mer_id' => $product_mer_id,
|
||||||
];
|
'financial_record_sn' => $financeSn . (($i++)+2)
|
||||||
if (!$is_combine) {
|
];
|
||||||
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payCityPrice);
|
if (!$is_combine) {
|
||||||
|
app()->make(MerchantRepository::class)->addLockMoney($product_mer_id, 'order', $order->order_id, $_payCityPrice);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user