commit antes da migração da versao do TYPEORM
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
|
||||
import { Address } from 'src/domain/models/address.model';
|
||||
import { Connection } from 'typeorm';
|
||||
//import { DataSource } from 'typeorm';
|
||||
import { EntityManager } from 'typeorm';
|
||||
import { Pcclientendent } from '../../domain/entity/tables/pcclientendent.entity';
|
||||
import { Pccidade } from '../../domain/entity/tables/pccidade.entity';
|
||||
import { ResultModel } from 'src/domain/models/result.model';
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -5,6 +5,9 @@ https://docs.nestjs.com/providers#services
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { connectionOptions } from 'src/configs/typeorm.config';
|
||||
import { Connection } from 'typeorm';
|
||||
//import { DataSource } from 'typeorm';
|
||||
//import { EntityManager } from 'typeorm';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class DashboardService {
|
||||
|
||||
@@ -7,6 +7,9 @@ import { Pcorcavendai } from 'src/domain/entity/tables/pcorcavendai.entity';
|
||||
import { Cart } from 'src/domain/models/cart.model';
|
||||
import { SharedService } from 'src/shared/services/shared.service';
|
||||
import { Connection } from 'typeorm';
|
||||
//import { DataSource } from 'typeorm';
|
||||
import { EntityManager } from 'typeorm';
|
||||
|
||||
import { Pcorcavendac } from '../../domain/entity/tables/pcorcavendac.entity';
|
||||
import { Shopping } from '../../domain/entity/tables/estprevendac.entity';
|
||||
import { connectionOptions } from 'src/configs/typeorm.config';
|
||||
|
||||
Reference in New Issue
Block a user