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); 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); // 服务商