This commit is contained in:
mkm 2024-01-24 17:45:07 +08:00
parent fe05e30fda
commit 6e85791d91

View File

@ -26,7 +26,7 @@ class StoreProcessing extends BaseController
if (!$store_group_order_other) {
unset($store_group_order['group_order_id']);
$group_order_id = Db::name('store_group_order_other')->insertGetId($store_group_order);
$group_order_id = Db::name('store_group_order_other')->strict(false)->insertGetId($store_group_order);
}
$select = Db::name('store_order_product')->where('order_id', $order['order_id'])->select();
if ($order['source'] == 103 && $select) {
@ -35,38 +35,15 @@ class StoreProcessing extends BaseController
$arr = $select->toArray();
$order['group_order_id'] = $group_order_id;
$order['source'] = 104;
//镇级支出
// $finance[] = [
// 'order_id' => $order['order_id'],
// 'order_sn' => $order['order_sn'],
// 'user_info' => $order['real_name'],
// 'user_id' => $order['uid'],
// 'financial_type' => 'supply_chain',
// 'financial_pm' => 0,
// 'type' => 0,
// 'number' => $order['procure_price'],
// 'mer_id' => $order['mer_id'],
// 'financial_record_sn' => $financeSn . '1'
// ];
$order['mer_id'] = $select[0]['product_mer_id'];
$order['uid'] = $merchant_two['uid'];
$order['real_name'] = $merchant_two['mer_name'] . '-' . $merchant_two['real_name'];
$order['user_phone'] = $merchant_two['mer_phone'];
$order['user_address'] = $merchant_two['mer_address'];
//市级获得
// $finance[] = [
// 'order_id' => $order['order_id'],
// 'order_sn' => $order['order_sn'],
// 'user_info' => $order['real_name'],
// 'user_id' => $order['uid'],
// 'financial_type' => 'supply_chain',
// 'financial_pm' => 1,
// 'type' => 0,
// 'number' => $order['procure_price'],
// 'mer_id' => $order['mer_id'],
// 'financial_record_sn' => $financeSn . '2'
// ];
unset($order['order_id'], $order['orderProduct'], $order['user'], $order['supply_chain_rate'], $order['logistics_code'], $order['logistics_phone'],$order['consumption_money']);
$order['order_type'] = 0;
unset($order['order_id'], $order['orderProduct'], $order['user'], $order['supply_chain_rate'], $order['logistics_code'], $order['logistics_phone']);
$order_id = Db::name('store_order_other')->strict(false)->insertGetId($order);
foreach ($arr as $key => $value) {
@ -76,7 +53,7 @@ class StoreProcessing extends BaseController
Db::name('store_product')->where('product_id',$value['product_id'])->dec('stock');
}
// $financialRecordRepository->insertAll($finance);
Db::name('store_order_product_other')->insertAll($arr);
Db::name('store_order_product_other')->strict(false)->insertAll($arr);
}
}
}