feat: complete drainage review and admin search workflows
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user