diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index c7be71c7..5c4d3f00 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -336,36 +336,6 @@ class StoreOrderRepository extends BaseRepository } 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) { $finance[] = [ 'order_id' => $order->order_id, diff --git a/app/controller/api/store/merchant/MerchantIntention.php b/app/controller/api/store/merchant/MerchantIntention.php index 64741cbb..05a2a08a 100644 --- a/app/controller/api/store/merchant/MerchantIntention.php +++ b/app/controller/api/store/merchant/MerchantIntention.php @@ -97,7 +97,8 @@ class MerchantIntention extends BaseController 'village' => $data['village_id'] ?? '', 'address' => $data['address'] ?? '', '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'; $res = $this->sendMerIntentionApply($sendData, $postUrl); diff --git a/app/listener/paySuccess.php b/app/listener/paySuccess.php index edc64b4b..c806d2ed 100644 --- a/app/listener/paySuccess.php +++ b/app/listener/paySuccess.php @@ -33,23 +33,23 @@ class paySuccess try { $orderList = $event['groupOrder']['orderList']; foreach ($orderList as $k => $order) { - $merchant = Merchant::find($order['mer_id']); + // $merchant = Merchant::find($order['mer_id']); //添加到代发订单表里 - if ($merchant['type_id'] == Merchant::TypeSupplyChain) { - $codes = explode(',', $order['user_address_code']); - 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(); - if ($merchant_two) { - $datas = [ - 'master_mer_id' => $order['mer_id'], - 'mer_id' => $merchant_two['mer_id'], - 'order_id' => $order['order_id'], - 'status' => 0 - ]; - Db::name('store_order_behalf')->insert($datas); - } - } - } + // if ($merchant['type_id'] == Merchant::TypeSupplyChain) { + // $codes = explode(',', $order['user_address_code']); + // 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(); + // if ($merchant_two) { + // $datas = [ + // 'master_mer_id' => $order['mer_id'], + // 'mer_id' => $merchant_two['mer_id'], + // 'order_id' => $order['order_id'], + // 'status' => 0 + // ]; + // Db::name('store_order_behalf')->insert($datas); + // } + // } + // } $this->recordOrderAddr($order); } } catch (\Exception $e) {