feat(platform-orders): 列表/导出回执数优先读 payment_summary.count(含测试)

This commit is contained in:
萝卜
2026-03-11 00:33:02 +00:00
parent 80b218bbfb
commit cc6835e19c
3 changed files with 78 additions and 3 deletions

View File

@@ -678,8 +678,9 @@ class PlatformOrderController extends Controller
}
$receipts = (array) (data_get($order->meta, 'payment_receipts', []) ?? []);
$receiptCount = count($receipts);
$latestReceipt = $receiptCount > 0 ? end($receipts) : null;
$receiptSummaryCount = data_get($order->meta, 'payment_summary.count');
$receiptCount = $receiptSummaryCount !== null ? (int) $receiptSummaryCount : count($receipts);
$latestReceipt = count($receipts) > 0 ? end($receipts) : null;
$refunds = (array) (data_get($order->meta, 'refund_receipts', []) ?? []);
$refundSummaryCount = data_get($order->meta, 'refund_summary.count');