fix: 订阅批量过期动作透传 ends_at 区间筛选

This commit is contained in:
萝卜
2026-03-17 06:27:34 +08:00
parent f39fb9ebcd
commit 0b2f0c7d74
4 changed files with 88 additions and 1 deletions

View File

@@ -320,6 +320,9 @@ class SiteSubscriptionController extends Controller
// - expired已过期ends_at < now
// - expiring_7d7 天内到期now <= ends_at < now+7d
'expiry' => trim((string) $request->query('expiry', '')),
// 到期时间范围筛选(用于到期治理更精确定位 ends_at
'ends_from' => trim((string) $request->query('ends_from', '')),
'ends_to' => trim((string) $request->query('ends_to', '')),
];
$query = $this->applyFilters(
@@ -448,6 +451,9 @@ class SiteSubscriptionController extends Controller
'merchant_id' => trim((string) $request->input('merchant_id', '')),
'plan_id' => trim((string) $request->input('plan_id', '')),
'expiry' => trim((string) $request->input('expiry', '')),
// 到期时间范围筛选:批量动作必须与当前列表口径一致
'ends_from' => trim((string) $request->input('ends_from', '')),
'ends_to' => trim((string) $request->input('ends_to', '')),
];
if ((string) ($filters['expiry'] ?? '') !== 'expired') {