This commit is contained in:
mkm 2024-01-05 17:58:52 +08:00
parent 6e672fa89b
commit b952ba45aa
3 changed files with 18 additions and 47 deletions

View File

@ -336,36 +336,6 @@ class StoreOrderRepository extends BaseRepository
} }
if (!$presell) { if (!$presell) {
if ($order['extension_one'] > 0) {
$finance[] = [
'order_id' => $order->order_id,
'order_sn' => $order->order_sn,
'user_info' => $groupOrder->user->nickname,
'user_id' => $uid,
'financial_type' => 'brokerage_one',
'financial_pm' => 0,
'type' => 1,
'number' => $order['extension_one'],
'mer_id' => $order->mer_id,
'financial_record_sn' => $financeSn . ($i++)
];
}
if ($order['extension_two'] > 0) {
$finance[] = [
'order_id' => $order->order_id,
'order_sn' => $order->order_sn,
'user_info' => $groupOrder->user->nickname,
'user_id' => $uid,
'financial_type' => 'brokerage_two',
'financial_pm' => 0,
'type' => 1,
'number' => $order['extension_two'],
'mer_id' => $order->mer_id,
'financial_record_sn' => $financeSn . ($i++)
];
}
if ($order['commission_rate'] > 0) { if ($order['commission_rate'] > 0) {
$finance[] = [ $finance[] = [
'order_id' => $order->order_id, 'order_id' => $order->order_id,

View File

@ -97,7 +97,8 @@ class MerchantIntention extends BaseController
'village' => $data['village_id'] ?? '', 'village' => $data['village_id'] ?? '',
'address' => $data['address'] ?? '', 'address' => $data['address'] ?? '',
'mer_intention_id' => $intention->mer_intention_id, 'mer_intention_id' => $intention->mer_intention_id,
'type_id'=>$data['mer_type_id']??'' 'type_id'=>$data['mer_type_id']??'',
'is_company'=>$data['is_company']??'',
]; ];
$postUrl = env('TASK_WORKER_HOST_URL') . '/adminapi/company/createShopMerchant'; $postUrl = env('TASK_WORKER_HOST_URL') . '/adminapi/company/createShopMerchant';
$res = $this->sendMerIntentionApply($sendData, $postUrl); $res = $this->sendMerIntentionApply($sendData, $postUrl);

View File

@ -33,23 +33,23 @@ class paySuccess
try { try {
$orderList = $event['groupOrder']['orderList']; $orderList = $event['groupOrder']['orderList'];
foreach ($orderList as $k => $order) { foreach ($orderList as $k => $order) {
$merchant = Merchant::find($order['mer_id']); // $merchant = Merchant::find($order['mer_id']);
//添加到代发订单表里 //添加到代发订单表里
if ($merchant['type_id'] == Merchant::TypeSupplyChain) { // if ($merchant['type_id'] == Merchant::TypeSupplyChain) {
$codes = explode(',', $order['user_address_code']); // $codes = explode(',', $order['user_address_code']);
if (count($codes) > 4) { // if (count($codes) > 4) {
$merchant_two = Db::name('merchant')->where('street_id', $codes[3])->where('type_id', 17)->where('category_id', $merchant['category_id'])->find(); // $merchant_two = Db::name('merchant')->where('street_id', $codes[3])->where('type_id', 17)->where('category_id', $merchant['category_id'])->find();
if ($merchant_two) { // if ($merchant_two) {
$datas = [ // $datas = [
'master_mer_id' => $order['mer_id'], // 'master_mer_id' => $order['mer_id'],
'mer_id' => $merchant_two['mer_id'], // 'mer_id' => $merchant_two['mer_id'],
'order_id' => $order['order_id'], // 'order_id' => $order['order_id'],
'status' => 0 // 'status' => 0
]; // ];
Db::name('store_order_behalf')->insert($datas); // Db::name('store_order_behalf')->insert($datas);
} // }
} // }
} // }
$this->recordOrderAddr($order); $this->recordOrderAddr($order);
} }
} catch (\Exception $e) { } catch (\Exception $e) {