fix: remove truncated management totals

This commit is contained in:
hectorzhao
2026-07-12 10:56:00 +08:00
parent 24cb632a45
commit 390b970032
19 changed files with 107 additions and 80 deletions
+2 -6
View File
@@ -89,7 +89,7 @@ export class BillingService {
constructor(private readonly prisma: PrismaService) {}
listPlans() {
return this.prisma.billingPlan.findMany({ orderBy: { createdAt: 'desc' }, take: 100 });
return this.prisma.billingPlan.findMany({ orderBy: { createdAt: 'desc' } });
}
createPlan(data: CreateBillingPlanDto) {
@@ -109,7 +109,6 @@ export class BillingService {
return this.prisma.tenantAccount.findMany({
include: { tenant: true },
orderBy: { createdAt: 'desc' },
take: 100,
});
}
@@ -129,7 +128,6 @@ export class BillingService {
where: tenantId ? { tenantId } : undefined,
include: { plan: true },
orderBy: { createdAt: 'desc' },
take: 100,
});
}
@@ -141,7 +139,6 @@ export class BillingService {
},
include: { plan: true },
orderBy: { createdAt: 'desc' },
take: 100,
});
const orderIds = orders.map((order) => order.id);
if (orderIds.length === 0) {
@@ -328,12 +325,11 @@ export class BillingService {
return this.prisma.smsBillingRecord.findMany({
where: { tenantId, taskId },
orderBy: { createdAt: 'desc' },
take: 100,
});
}
listRules() {
return this.prisma.billingRule.findMany({ orderBy: { createdAt: 'desc' }, take: 100 });
return this.prisma.billingRule.findMany({ orderBy: { createdAt: 'desc' } });
}
createRule(data: CreateBillingRuleDto) {