优化资金审核与流水展示
This commit is contained in:
@@ -134,6 +134,7 @@ export type WorkerWalletLedgerRow = {
|
||||
note: string
|
||||
payload_json: string | Record<string, unknown>
|
||||
created_at: string
|
||||
related_platform_order_id?: string | null
|
||||
}
|
||||
|
||||
export type WorkerFinanceRequestRow = {
|
||||
|
||||
@@ -539,8 +539,11 @@ export async function listWorkerWalletLedgers({
|
||||
params.push(pageSize, offset)
|
||||
const itemsResult = await query<WorkerWalletLedgerRow>(
|
||||
`
|
||||
SELECT *
|
||||
SELECT
|
||||
wwl.*,
|
||||
wo.platform_order_id AS related_platform_order_id
|
||||
FROM worker_wallet_ledgers wwl
|
||||
LEFT JOIN work_orders wo ON wo.id = wwl.related_work_order_id
|
||||
${whereClause}
|
||||
ORDER BY wwl.created_at DESC, wwl.id DESC
|
||||
LIMIT $${params.length - 1} OFFSET $${params.length}
|
||||
|
||||
Reference in New Issue
Block a user