optimize ui loading and dashboard performance

This commit is contained in:
hectorzhao
2026-08-27 15:17:47 +08:00
parent 7ff019e829
commit ecb567c0da
28 changed files with 1307 additions and 132 deletions
+2 -2
View File
@@ -202,10 +202,10 @@ export class PrismaCdrsRepository implements CdrsRepository {
async list(query: CdrQuery): Promise<{ items: CdrListItem[]; meta: CdrPageMeta }> {
const where = this.where(query);
const [items, total] = await this.prisma.$transaction([
const [items, total] = await Promise.all([
this.prisma.rawCdr.findMany({
where,
orderBy: [{ startedAt: 'desc' }],
orderBy: [{ startedAt: 'desc' }, { id: 'desc' }],
take: query.take,
skip: query.skip,
include: this.includeCdr()