feat(platform-orders): 退款总额统计(详情页+导出)

This commit is contained in:
萝卜
2026-03-10 16:55:39 +00:00
parent 7fe488b1f3
commit 55450e9100
4 changed files with 23 additions and 0 deletions

View File

@@ -537,6 +537,7 @@ class PlatformOrderController extends Controller
'最近退款时间',
'最近退款金额',
'最近退款渠道',
'退款总额',
];
if ($includeMeta) {
@@ -596,6 +597,13 @@ class PlatformOrderController extends Controller
(string) (data_get($latestRefund, 'refunded_at') ?? ''),
(float) (data_get($latestRefund, 'amount') ?? 0),
(string) (data_get($latestRefund, 'channel') ?? ''),
(function () use ($refunds) {
$total = 0.0;
foreach ($refunds as $r) {
$total += (float) (data_get($r, 'amount') ?? 0);
}
return $total;
})(),
];
if ($includeMeta) {