commit antes da migração da versao do TYPEORM
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user