Schema
This commit is contained in:
parent
ae8d77edea
commit
96efb5d62e
@ -133,8 +133,12 @@ class FlowPoolService extends Service
|
|||||||
'cards.virtual_activated_at'
|
'cards.virtual_activated_at'
|
||||||
];
|
];
|
||||||
|
|
||||||
$flows = app(FlowPoolMonth::class)->setTable($table)->leftJoin('cards', 'cards.sim', '=', "{$table}.sim")->select($select)
|
if (Schema::hasTable($table)) {
|
||||||
|
$flows = app(FlowPoolMonth::class)->setTable($table)->leftJoin('cards', 'cards.sim', '=', "{$table}.sim")->select($select)
|
||||||
->whereIn('pool_id', $flowPools->pluck('id')->toArray())->get()->groupBy('pool_id');
|
->whereIn('pool_id', $flowPools->pluck('id')->toArray())->get()->groupBy('pool_id');
|
||||||
|
} else {
|
||||||
|
$flows = [];
|
||||||
|
}
|
||||||
|
|
||||||
// 流量统计
|
// 流量统计
|
||||||
$flowPools->map(function ($flowPool) use ($month, $flows) {
|
$flowPools->map(function ($flowPool) use ($month, $flows) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user