From b754ecfa5f533c55a8661f793ffcdced6d3ba8a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 20:41:58 +0800 Subject: [PATCH] feat(export): add reconcile/refund inconsistent flags to platform order CSV --- app/Http/Controllers/Admin/PlatformOrderController.php | 4 ++++ tests/Feature/AdminPlatformOrderExportTest.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/app/Http/Controllers/Admin/PlatformOrderController.php b/app/Http/Controllers/Admin/PlatformOrderController.php index b17189f..f19d78f 100644 --- a/app/Http/Controllers/Admin/PlatformOrderController.php +++ b/app/Http/Controllers/Admin/PlatformOrderController.php @@ -1374,6 +1374,8 @@ class PlatformOrderController extends Controller '退款总额', '回执总额', '对账差额', + '对账不一致', + '退款不一致', ]; if ($includeMeta) { @@ -1443,6 +1445,8 @@ class PlatformOrderController extends Controller (float) $order->refundTotal(), (float) $order->receiptTotal(), (float) $order->receiptTotal() - (float) ($order->paid_amount ?? 0), + ((bool) $order->isReconcileMismatch()) ? '1' : '0', + ((bool) $order->isRefundInconsistent()) ? '1' : '0', ]; if ($includeMeta) { diff --git a/tests/Feature/AdminPlatformOrderExportTest.php b/tests/Feature/AdminPlatformOrderExportTest.php index 9599f06..ee32b6c 100644 --- a/tests/Feature/AdminPlatformOrderExportTest.php +++ b/tests/Feature/AdminPlatformOrderExportTest.php @@ -129,6 +129,8 @@ class AdminPlatformOrderExportTest extends TestCase $this->assertStringContainsString('最近批量生效时间', $content); $this->assertStringContainsString('最近批量生效管理员', $content); $this->assertStringContainsString('退款总额', $content); + $this->assertStringContainsString('对账不一致', $content); + $this->assertStringContainsString('退款不一致', $content); // include_meta=1 时应包含 meta(JSON) 列 $res2 = $this->get('/admin/platform-orders/export?download=1&include_meta=1');