调整线下扫码支付

This commit is contained in:
lewis 2024-02-29 21:09:37 +08:00
parent 735db0e46d
commit 58a03e755e
2 changed files with 6 additions and 3 deletions

View File

@ -827,7 +827,7 @@ class StoreOrderCreateRepository extends StoreOrderRepository
if (($orderType == 98 || $orderType == 99) && count($merchantCartList) > 1) {
throw new ValidateException('采购、委托商品不支持跨店购买');
}
if ($hasTake) {
if ($hasTake && $orderInfo['source'] != 999) {
app()->make(UserAddressValidate::class)->scene('take')->check($post);
}
@ -902,8 +902,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository
'spread_uid' => $spreadUid,
'top_uid' => $topUid,
'is_selfbuy' => $isSelfBuy,
'real_name' => $merchantCart['order']['isTake'] ? $post['real_name'] : ($address['real_name'] ?? ''),
'user_phone' => $merchantCart['order']['isTake'] ? $post['phone'] : ($address['phone'] ?? ''),
'real_name' => $merchantCart['order']['isTake'] ? $post['real_name'] ?? '' : ($address['real_name'] ?? ''),
'user_phone' => $merchantCart['order']['isTake'] ? $post['phone'] ?? '' : ($address['phone'] ?? ''),
'user_address' => $user_address,
'user_address_code' => $user_address_code,
'cart_id' => implode(',', array_column($merchantCart['list'], 'cart_id')),

View File

@ -231,6 +231,9 @@ class StoreOrderRepository extends BaseRepository
(new StoreActivityDao())->saveOrderProduct(2, $order);
$order->paid = 1;
$order->pay_time = $time;
if ($order->source == 999) {
$order->status = 3;
}
$svipDiscount = bcadd($order->svip_discount, $svipDiscount, 2);
if (isset($subOrders[$order->order_sn])) {
$order->transaction_id = $subOrders[$order->order_sn]['transaction_id'];