diff --git a/src/excel/excel.service.ts b/src/excel/excel.service.ts index d21a1c4..15c84e3 100644 --- a/src/excel/excel.service.ts +++ b/src/excel/excel.service.ts @@ -813,21 +813,23 @@ export class ExcelService { } finally { await queryRunner.release(); - await this.servActivosRepo - .createQueryBuilder() - .update() - .set({ - Red: false, - Prestamos: false, - AT: false, - Correo: false, - RedStatus: 'Inactivo', - PrestamosStatus: 'Inactivo', - ATStatus: 'Inactivo', - CorreoStatus: 'Inactivo', - }) - .where('id_usuario NOT IN (SELECT id_usuario FROM usuario)') - .execute(); + await this.servActivosRepo + .createQueryBuilder() + .update() + .set({ + Red: false, + Prestamos: false, + AT: false, + Correo: false, + RedStatus: 'Inactivo', + PrestamosStatus: 'Inactivo', + ATStatus: 'Inactivo', + CorreoStatus: 'Inactivo', + }) + .where('id_usuario NOT IN (:...ids)', { ids: idsUsuarios }) + .execute(); + + }