fix(platform-orders): syncable_only filter should only apply when value is 1

This commit is contained in:
萝卜
2026-03-16 19:15:11 +08:00
parent dbb88f59f6
commit d7c4fc9d17

View File

@@ -2244,7 +2244,7 @@ class PlatformOrderController extends Controller
$builder->whereRaw("JSON_UNQUOTE(JSON_EXTRACT(meta, '$.batch_mark_paid_and_activate_error.message')) LIKE ?", ['%' . $kw . '%']);
}
})
->when(($filters['syncable_only'] ?? '') !== '', function (Builder $builder) {
->when(($filters['syncable_only'] ?? '') === '1', function (Builder $builder) {
// 只看可同步:已支付 + 已生效 + 尚未写入 subscription_activation.subscription_id
// 额外治理口径:排除(续费但未绑定订阅)的脏数据,避免误入可同步集合导致串单风险
$builder->where('payment_status', 'paid')