platform orders: syncable summary excludes renewal missing subscription
This commit is contained in:
@@ -414,6 +414,11 @@ class PlatformOrderController extends Controller
|
||||
->where('payment_status', 'paid')
|
||||
->where('status', 'activated')
|
||||
->whereRaw("JSON_EXTRACT(meta, '$.subscription_activation.subscription_id') IS NULL")
|
||||
// 口径一致:排除(续费但未绑定订阅)的脏数据
|
||||
->where(function (\Illuminate\Database\Eloquent\Builder $q) {
|
||||
$q->where('order_type', '!=', 'renewal')
|
||||
->orWhereNotNull('site_subscription_id');
|
||||
})
|
||||
->count(),
|
||||
'batch_synced_24h_orders' => (function () use ($baseQuery) {
|
||||
$since = now()->subHours(24)->format('Y-m-d H:i:s');
|
||||
|
||||
Reference in New Issue
Block a user