Log::
This commit is contained in:
parent
b5c1013ac8
commit
07660724d4
@ -87,12 +87,8 @@ class OrderService extends Service
|
|||||||
throw new NotAllowedException("当前请求数据量过大,请筛选过滤后查询");
|
throw new NotAllowedException("当前请求数据量过大,请筛选过滤后查询");
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info('1', [microtime(true)]);
|
|
||||||
|
|
||||||
$cards = $this->orderCardPartitionRepository->withVirtual($conditions)->currentModel()->get()->toArray();
|
$cards = $this->orderCardPartitionRepository->withVirtual($conditions)->currentModel()->get()->toArray();
|
||||||
|
|
||||||
Log::info('2', [microtime(true)]);
|
|
||||||
|
|
||||||
$tmpCards = array_groupBy($cards, 'virtual_order_id');
|
$tmpCards = array_groupBy($cards, 'virtual_order_id');
|
||||||
|
|
||||||
$orderIds = array_unique(array_keys($tmpCards));
|
$orderIds = array_unique(array_keys($tmpCards));
|
||||||
@ -103,16 +99,12 @@ class OrderService extends Service
|
|||||||
unset($orderIds[$key]);
|
unset($orderIds[$key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info('3', [microtime(true)]);
|
|
||||||
|
|
||||||
$virtualOrders = [];
|
$virtualOrders = [];
|
||||||
// 有订单的从订单中读取公司和套餐
|
// 有订单的从订单中读取公司和套餐
|
||||||
if (!empty($orderIds)) {
|
if (!empty($orderIds)) {
|
||||||
$virtualOrders = app(VirtualOrderRepository::class)->withConditions(['id' => $orderIds])->get()->keyBy('id')->toArray();
|
$virtualOrders = app(VirtualOrderRepository::class)->withConditions(['id' => $orderIds])->get()->keyBy('id')->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info('4', [microtime(true)]);
|
|
||||||
|
|
||||||
$companyService = app(CompanyService::class);
|
$companyService = app(CompanyService::class);
|
||||||
$packageService = app(PackageService::class);
|
$packageService = app(PackageService::class);
|
||||||
|
|
||||||
@ -131,8 +123,6 @@ class OrderService extends Service
|
|||||||
$item['package_name'] = !$item['package_id'] ? '' : $packageService->load($item['package_id'])['name'] ?? '';
|
$item['package_name'] = !$item['package_id'] ? '' : $packageService->load($item['package_id'])['name'] ?? '';
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info('5', [microtime(true)]);
|
|
||||||
|
|
||||||
return array_values(array_sort($cards, function ($value) {
|
return array_values(array_sort($cards, function ($value) {
|
||||||
return $value['order_id'] . '-' . $value['sim'];
|
return $value['order_id'] . '-' . $value['sim'];
|
||||||
}));
|
}));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user