feat(export): add reconcile/refund inconsistent flags to platform order CSV

This commit is contained in:
萝卜
2026-03-17 20:41:58 +08:00
parent 55061b48f4
commit b754ecfa5f
2 changed files with 6 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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');