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

@@ -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';

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();

View File

@@ -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 {

View File

@@ -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';