优化订单搜索和对账的批量取数与索引查询

This commit is contained in:
黄健铭 committed 2026-12-05 19:15:04 -08:00
1 parent 3aebb62252
commit cf0b0be83f
16 files changed
+671 -186

No files matched your search

@@ -152,9 +152,8 @@ function rowDetail(ledger, row, actor) {
summary: saved.summary,
};
}
function projection(ledger, id) {
const request = pending(ledger, id),
accepted = approved(ledger, id);
function projection(ledger, id, requests = { pending: pending(ledger, id), approved: approved(ledger, id) }) {
const { pending: request, approved: accepted } = requests;
const compact = row =>
row
? {