feat: complete drainage review and admin search workflows

This commit is contained in:
hectorzhao
2026-07-14 09:58:18 +08:00
parent dec2430b7e
commit 6421671259
33 changed files with 1107 additions and 255 deletions
@@ -40,6 +40,9 @@ function createPrismaMock() {
smsSignature: {
count: jest.fn().mockResolvedValue(1),
},
smsDrainageInfo: {
count: jest.fn().mockResolvedValue(0),
},
enterpriseCertification: {
count: jest.fn().mockResolvedValue(1),
},
@@ -261,6 +264,7 @@ describe('OperationsService', () => {
enterpriseCertifications: 1,
smsAudits: 2,
signatures: 1,
drainageInfos: 0,
templates: 1,
total: 5,
},
+4 -2
View File
@@ -731,14 +731,16 @@ export class OperationsService {
return Promise.all([
this.prisma.smsTemplate.count({ where: { tenantId, auditStatus: 'pending' } }),
this.prisma.smsSignature.count({ where: { tenantId, auditStatus: 'pending' } }),
this.prisma.smsDrainageInfo.count({ where: { tenantId, auditStatus: 'pending' } }),
this.prisma.enterpriseCertification.count({ where: { tenantId, status: 'pending' } }),
this.prisma.smsSendTask.count({ where: { tenantId, status: 'pending_review' } }),
]).then(([templates, signatures, enterpriseCertifications, smsAudits]) => ({
]).then(([templates, signatures, drainageInfos, enterpriseCertifications, smsAudits]) => ({
templates,
signatures,
drainageInfos,
enterpriseCertifications,
smsAudits,
total: templates + signatures + enterpriseCertifications + smsAudits,
total: templates + signatures + drainageInfos + enterpriseCertifications + smsAudits,
}));
}