更新金额

This commit is contained in:
mkm 2023-12-29 18:04:54 +08:00
parent 58ee9d16e3
commit 0204f78ee0

View File

@ -293,22 +293,11 @@ class StoreOtherOrderRepository extends BaseRepository
'mer_id' => $order->mer_id,
'financial_record_sn' => $financeSn . ($i++)
];
$_payPrice = bcadd($_payPrice, $order->platform_coupon_price, 2);
// $_payPrice = bcadd($_payPrice, $order->platform_coupon_price, 2);
}
if (!$is_combine) {
app()->make(MerchantRepository::class)->addLockMoney($order->mer_id, 'order', $order->order_id, $_payPrice);
}
}
if ($is_combine) {
$profitsharing[] = [
'profitsharing_sn' => $storeOrderProfitsharingRepository->getOrderSn(),
'order_id' => $order->order_id,
'transaction_id' => $order->transaction_id ?? '',
'mer_id' => $order->mer_id,
'profitsharing_price' => $order->pay_price,
'profitsharing_mer_price' => $_payPrice,
'type' => $storeOrderProfitsharingRepository::PROFITSHARING_TYPE_ORDER,
];
// if (!$is_combine) {
// app()->make(MerchantRepository::class)->addLockMoney($order->mer_id, 'order', $order->order_id, $_payPrice);
// }
}
$userMerchantRepository->updatePayTime($uid, $order->mer_id, $order->pay_price);
SwooleTaskService::merchant('notice', [
@ -339,16 +328,13 @@ class StoreOtherOrderRepository extends BaseRepository
}
$this->giveIntegral($groupOrder);
if (count($profitsharing)) {
$storeOrderProfitsharingRepository->insertAll($profitsharing);
}
$financialRecordRepository->insertAll($finance);
$storeOrderStatusRepository->batchCreateLog($orderStatus);
$groupOrder->save();
Db::commit();
return true;
} catch (\Exception $e) {
halt($e->getMessage());
Log::error('财务点击支付失败'.$e->getMessage());
// 回滚事务
Db::rollback();
return false;