se cambió la estructura
This commit is contained in:
@@ -813,16 +813,8 @@ export class ExcelService {
|
||||
} finally {
|
||||
await queryRunner.release();
|
||||
|
||||
const subQuery = await this.servActivosRepo.manager
|
||||
await this.servActivosRepo
|
||||
.createQueryBuilder()
|
||||
.select('1')
|
||||
.from(Usuario, 'u')
|
||||
.where('u.id_usuario = sa.id_usuario')
|
||||
.andWhere('u.id_usuario IN (:...ids)')
|
||||
.getQuery();
|
||||
|
||||
await this.servActivosRepo
|
||||
.createQueryBuilder('sa')
|
||||
.update()
|
||||
.set({
|
||||
Red: false,
|
||||
@@ -834,10 +826,10 @@ await this.servActivosRepo
|
||||
ATStatus: 'Inactivo',
|
||||
CorreoStatus: 'Inactivo',
|
||||
})
|
||||
.where(`NOT EXISTS (${subQuery})`)
|
||||
.setParameters({ ids: idsUsuarios })
|
||||
.where('id_usuario NOT IN (SELECT id_usuario FROM usuario)')
|
||||
.execute();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user