diff --git a/app/Http/Controllers/Admin/PlatformOrderController.php b/app/Http/Controllers/Admin/PlatformOrderController.php index db3b4a9..fc02e43 100644 --- a/app/Http/Controllers/Admin/PlatformOrderController.php +++ b/app/Http/Controllers/Admin/PlatformOrderController.php @@ -1610,7 +1610,7 @@ class PlatformOrderController extends Controller if ($scope === 'filtered' && ($filters['syncable_only'] ?? '') === '1' && ((string) ($filters['receipt_status'] ?? '') === 'none')) { - return redirect()->back()->with('warning', '当前筛选为「无回执」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再批量同步订阅。'); + return redirect()->back()->with('warning', '当前筛选为「无回执(广义)」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再批量同步订阅。'); } // 防误操作(口径一致):当用户显式传入了 status/payment_status 时,要求口径至少锁定「已支付+已生效」 @@ -1939,7 +1939,7 @@ class PlatformOrderController extends Controller // 治理优先:当用户显式筛选「无回执」时,不允许直接批量生效 if ((string) ($filters['receipt_status'] ?? '') === 'none') { - return redirect()->back()->with('warning', '当前筛选为「无回执」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再执行批量仅标记为已生效。'); + return redirect()->back()->with('warning', '当前筛选为「无回执(广义)」订单集合。为保证收费闭环可治理,请先补齐支付回执留痕后再执行批量仅标记为已生效。'); } // 治理优先:当用户显式筛选「有退款」时,不允许直接批量生效 diff --git a/tests/Feature/AdminPlatformOrderBatchSyncWarningsShouldClarifyBroadReceiptNoneScopeTest.php b/tests/Feature/AdminPlatformOrderBatchSyncWarningsShouldClarifyBroadReceiptNoneScopeTest.php new file mode 100644 index 0000000..b071fbf --- /dev/null +++ b/tests/Feature/AdminPlatformOrderBatchSyncWarningsShouldClarifyBroadReceiptNoneScopeTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_batch_activate_subscriptions_warning_should_clarify_broad_receipt_none_scope(): void + { + $this->loginAsPlatformAdmin(); + + $syncRes = $this->post('/admin/platform-orders/batch-activate-subscriptions', [ + 'scope' => 'filtered', + 'receipt_status' => 'none', + 'syncable_only' => '1', + ]); + $syncRes->assertRedirect(); + $syncRes->assertSessionHas('warning'); + $this->assertStringContainsString('无回执(广义)', (string) session('warning')); + } +}