更新
This commit is contained in:
parent
e066be0bbc
commit
4bd91ebb98
@ -1001,6 +1001,17 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
'status' => 1
|
||||
];
|
||||
}
|
||||
if ($order['consumption_money'] > 0) {
|
||||
$consumptionDetails[] = [
|
||||
'user_id' => $uid,
|
||||
'order_id' => $_order->order_id,
|
||||
'group_order_id' => $groupOrder->group_order_id,
|
||||
'type' => 1,
|
||||
'amount' => $order['consumption_money'],
|
||||
'pay_price' => $order['total_price'],
|
||||
'create_time' => time()
|
||||
];
|
||||
}
|
||||
|
||||
//创建发票信息
|
||||
if (isset($receipt_data[$_order['mer_id']])) {
|
||||
@ -1117,6 +1128,9 @@ class StoreOrderCreateRepository extends StoreOrderRepository
|
||||
if (count($bills) > 0) {
|
||||
app()->make(UserBillRepository::class)->insertAll($bills);
|
||||
}
|
||||
if (count($consumptionDetails) > 0) {
|
||||
Db::name('store_consumption_detail')->insertAll($consumptionDetails);
|
||||
}
|
||||
$storeOrderStatusRepository->batchCreateLog($orderStatus);
|
||||
$storeOrderProductRepository->insertAll($orderProduct);
|
||||
event('order.create', compact('groupOrder'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user