From 200c2cff5ae162d81d4825eef0fd7b8663dc59b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Wed, 11 Mar 2026 08:19:08 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AE=A2=E5=8D=95=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E5=8C=BA=EF=BC=9A=E6=B2=BB=E7=90=86=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E4=B8=8B=E5=A2=9E=E5=8A=A0=E6=93=8D=E4=BD=9C=E9=A1=BA=E5=BA=8F?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/platform_orders/index.blade.php | 21 ++++++++++ ...inPlatformOrderToolsGovernanceHintTest.php | 41 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 9095cdb..4309e7d 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -256,6 +256,27 @@

工具

清除仅影响订单 meta 中的失败标记,不改变订单/订阅状态。
+ @php + $hasReconcileMismatchFilter = (($filters['reconcile_mismatch'] ?? '') === '1'); + $hasRefundInconsistentFilter = (($filters['refund_inconsistent'] ?? '') === '1'); + @endphp + + @if($hasReconcileMismatchFilter || $hasRefundInconsistentFilter) +
+ 提示:当前筛选包含 + @if($hasReconcileMismatchFilter) + 对账不一致 + @endif + @if($hasReconcileMismatchFilter && $hasRefundInconsistentFilter) + + @endif + @if($hasRefundInconsistentFilter) + 退款不一致 + @endif + 。建议先完成金额/状态治理(补回执/核对退款)后,再执行批量同步订阅等工具动作。 +
+ @endif +
diff --git a/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php b/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php new file mode 100644 index 0000000..a25a364 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderToolsGovernanceHintTest.php @@ -0,0 +1,41 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_tools_show_governance_hint_when_reconcile_mismatch_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/platform-orders?reconcile_mismatch=1') + ->assertOk() + ->assertSee('建议先完成金额/状态治理', false) + ->assertSee('对账不一致', false); + } + + public function test_platform_orders_tools_show_governance_hint_when_refund_inconsistent_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/platform-orders?refund_inconsistent=1') + ->assertOk() + ->assertSee('建议先完成金额/状态治理', false) + ->assertSee('退款不一致', false); + } +}