fix(admin-dashboard): scope plan share to last 7 days
This commit is contained in:
@@ -196,9 +196,10 @@ class DashboardController extends Controller
|
|||||||
->limit(5)
|
->limit(5)
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
// 占比卡(最小可用):按套餐统计平台订单数量 TopN
|
// 占比卡(最小可用):近 7 天按套餐统计平台订单数量 TopN
|
||||||
$planOrderShare = PlatformOrder::query()
|
$planOrderShare = PlatformOrder::query()
|
||||||
->selectRaw('plan_id, COUNT(*) as cnt')
|
->selectRaw('plan_id, COUNT(*) as cnt')
|
||||||
|
->whereBetween('created_at', [$trendStart, $trendEnd])
|
||||||
->whereNotNull('plan_id')
|
->whereNotNull('plan_id')
|
||||||
->groupBy('plan_id')
|
->groupBy('plan_id')
|
||||||
->orderByDesc('cnt')
|
->orderByDesc('cnt')
|
||||||
|
|||||||
Reference in New Issue
Block a user