平台订单列表订阅锁定筛选:新建订单链接显式带 order_type=renewal 并更新测试
This commit is contained in:
@@ -1036,9 +1036,11 @@
|
||||
}
|
||||
if (trim((string) ($filters['site_subscription_id'] ?? '')) !== '') {
|
||||
$createQuery['site_subscription_id'] = (int) ($filters['site_subscription_id'] ?? 0);
|
||||
// 治理口径:当从订阅维度锁定进入时,创建页应显式携带 require_subscription=1
|
||||
//(即使已带 site_subscription_id,也用于统一口径/便于排查链路来源)。
|
||||
// 治理口径:当从订阅维度锁定进入时:
|
||||
// 1) 显式声明 require_subscription=1(统一来源口径/便于排查链路来源)
|
||||
// 2) 显式声明 order_type=renewal(语义更清晰;create 页仍会二次强制兜底)
|
||||
$createQuery['require_subscription'] = '1';
|
||||
$createQuery['order_type'] = 'renewal';
|
||||
}
|
||||
// 线索联动:若当前列表已按 lead_id 锁定,则新建订单也应带上 lead_id,维持闭环追溯
|
||||
if (trim((string) ($filters['lead_id'] ?? '')) !== '') {
|
||||
|
||||
@@ -73,6 +73,7 @@ class AdminPlatformOrderIndexCreateLinkPrefillFromFiltersTest extends TestCase
|
||||
'plan_id' => $plan->id,
|
||||
'site_subscription_id' => $sub->id,
|
||||
'require_subscription' => '1',
|
||||
'order_type' => 'renewal',
|
||||
]);
|
||||
|
||||
$res->assertSee($expectedCreateUrl, false);
|
||||
|
||||
Reference in New Issue
Block a user