feat(platform-orders): show bmpa success/failed summary and add bmpa_success_orders stat

This commit is contained in:
萝卜
2026-03-18 03:41:51 +08:00
parent 806d9fa180
commit 5ee3052280
3 changed files with 10 additions and 3 deletions

View File

@@ -436,6 +436,10 @@ class PlatformOrderController extends Controller
'bmpa_failed_orders' => (clone $baseQuery)
->whereRaw("JSON_EXTRACT(meta, '$.batch_mark_paid_and_activate_error.message') IS NOT NULL")
->count(),
'bmpa_success_orders' => (clone $baseQuery)
->whereRaw("JSON_EXTRACT(meta, '$.batch_mark_paid_and_activate.run_id') IS NOT NULL")
->whereRaw("JSON_EXTRACT(meta, '$.batch_mark_paid_and_activate_error.message') IS NULL")
->count(),
'unsynced_orders' => (clone $baseQuery)
->whereRaw("JSON_EXTRACT(meta, '$.subscription_activation.subscription_id') IS NULL")
->whereRaw("JSON_EXTRACT(meta, '$.subscription_activation_error.message') IS NULL")