feat(platform-orders): 摘要卡增加有退款/无退款订单数(含测试)
This commit is contained in:
@@ -294,6 +294,16 @@ class PlatformOrderController extends Controller
|
||||
->whereRaw("JSON_EXTRACT(meta, '$.payment_summary.total_amount') IS NULL")
|
||||
->whereRaw("JSON_EXTRACT(meta, '$.payment_receipts[0].amount') IS NULL")
|
||||
->count(),
|
||||
'refund_orders' => (clone $baseQuery)
|
||||
->where(function (Builder $q) {
|
||||
$q->whereRaw("JSON_EXTRACT(meta, '$.refund_summary.total_amount') IS NOT NULL")
|
||||
->orWhereRaw("JSON_EXTRACT(meta, '$.refund_receipts[0].amount') IS NOT NULL");
|
||||
})
|
||||
->count(),
|
||||
'no_refund_orders' => (clone $baseQuery)
|
||||
->whereRaw("JSON_EXTRACT(meta, '$.refund_summary.total_amount') IS NULL")
|
||||
->whereRaw("JSON_EXTRACT(meta, '$.refund_receipts[0].amount') IS NULL")
|
||||
->count(),
|
||||
'total_receipt_amount' => $totalReceiptAmount,
|
||||
// 对账差额:回执总额 - 订单已付总额(当前筛选范围)
|
||||
'reconciliation_delta' => (float) ($totalReceiptAmount - $totalPaidAmount),
|
||||
|
||||
Reference in New Issue
Block a user