From 10d6a066f01a288dc907cfbbbc606a9e234954d1 Mon Sep 17 00:00:00 2001 From: weigang Date: Mon, 28 Sep 2020 14:56:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BA=97=E9=93=BA=E5=85=B3=E5=BA=97?= =?UTF-8?q?=E6=97=B6=E6=97=A0=E6=B3=95=E6=94=B6=E5=88=B0=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../v3/Implementations/SeparateAccountsService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Service/v3/Implementations/SeparateAccountsService.php b/app/Service/v3/Implementations/SeparateAccountsService.php index 40e7e03..7401357 100644 --- a/app/Service/v3/Implementations/SeparateAccountsService.php +++ b/app/Service/v3/Implementations/SeparateAccountsService.php @@ -113,7 +113,7 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface // 新商户流水 foreach ($orders as $key => &$order) { - $store = Store::query()->find($order['store_id']); + $store = Store::query()->withoutGlobalScope('normal')->find($order['store_id']); $this->financialRecordService->storeByOLOrderComp($store->user_id, $orderMain->global_order_id ,$order['money']); } // =======商户订单收入流水 / End======= @@ -190,7 +190,7 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface foreach ($orders as $key => &$order) { // 当前订单(子)对应商户是否有市场经理绑定关系 - $store = Store::query()->find($order['store_id']); // 商户 + $store = Store::query()->withoutGlobalScope('normal')->find($order['store_id']); // 商户 // $mmInfo = MmInfo::query()->where(['user_id' => $store->mm_user_id])->first(); // 市场经理 // if (empty($mmInfo)) continue; // $market = Market::query()->find($mmInfo->market_id); // 市场 @@ -295,7 +295,7 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface $message = []; // 商户 - $store = Store::find($order->store_id); + $store = Store::query()->withoutGlobalScope('normal')->find($order->store_id); // 新商户订单流水 $this->financialRecordService->storeByOFLOrderComp($store->user_id, $orderMain->global_order_id, $order->money); @@ -370,7 +370,7 @@ class SeparateAccountsService implements SeparateAccountsServiceInterface ]; // 当前订单(子)对应商户是否有市场经理绑定关系 - $store = Store::query()->find($order['store_id']); // 商户 + $store = Store::query()->withoutGlobalScope('normal')->find($order['store_id']); // 商户 // $mmInfo = MmInfo::query()->where(['user_id' => $store->mm_user_id])->first(); // 市场经理 $market = Market::query()->find($orderMain->market_id); // 市场 $mpInfo = MpInfo::query()->find($market->mp_id); // 服务商 From c2fef05c0825087d4f039a80fb06addcc404d931 Mon Sep 17 00:00:00 2001 From: weigang Date: Mon, 28 Sep 2020 15:15:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BD=93=E9=9D=A2=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/OrderOfflineService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Service/v3/Implementations/OrderOfflineService.php b/app/Service/v3/Implementations/OrderOfflineService.php index 33883b8..10e2b8e 100644 --- a/app/Service/v3/Implementations/OrderOfflineService.php +++ b/app/Service/v3/Implementations/OrderOfflineService.php @@ -40,7 +40,7 @@ class OrderOfflineService implements OrderOfflineServiceInterface $mainTable = ApplicationContext::getContainer()->get(OrderMain::class)->getTable(); $childTable = ApplicationContext::getContainer()->get(Order::class)->getTable(); - $store = Store::find($storeId); + $store = Store::query()->withoutGlobalScope('normal')->find($storeId); // 获取分布式全局ID $generator = ApplicationContext::getContainer()->get(IdGeneratorInterface::class);