commit antes da migração da versao do TYPEORM

This commit is contained in:
JurTI-BR
2025-03-14 15:22:40 -03:00
parent 17fd2a5411
commit bdb0cd926a
12 changed files with 63 additions and 52 deletions

View File

@@ -3,6 +3,8 @@ import { Injectable, HttpException } from '@nestjs/common';
import { connectionOptions } from '../../configs/typeorm.config';
import { Customer } from '../../domain/models/customer.model';
import { Connection } from 'typeorm';
//import { DataSource } from 'typeorm';
import { EntityManager } from 'typeorm';
import { Pcclient } from '../../domain/entity/tables/pcclient.entity';
import { Estcategoriacliente } from '../../domain/entity/tables/estcategoriacliente.entity';
import { Estsubcategoriacliente } from '../../domain/entity/tables/estsubcategoriacliente.entity';
@@ -183,18 +185,6 @@ export class CustomerService {
default:
throw new HttpException('Não foi informado um campo válido para pesquisa.', HttpStatus.BAD_REQUEST);
}
/*
if (document){
where += "REGEXP_REPLACE(\"pcclient\".cgcent, '[^0-9]', '') = REGEXP_REPLACE('"+document+"', '[^0-9]', '')";
}
if (name){
if(where.length > 0) {
where += " AND \"pcclient\".cliente like '" + name + "%'";
} else {
where += "\"pcclient\".cliente like '" + name + "%'";
}
}*/
const connection = new Connection(connectionOptions);
await connection.connect();