Browse Source

Merge branch '0927-hotfix-store-close-financial' into master

master
weigang 5 years ago
parent
commit
c24fc5c8a0
  1. 2
      app/Service/v3/Implementations/OrderOfflineService.php
  2. 8
      app/Service/v3/Implementations/SeparateAccountsService.php

2
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);

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

Loading…
Cancel
Save