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