FIX: Mostrar unidad principal en busqueda
This commit is contained in:
@ -107,10 +107,6 @@ class Search
|
|||||||
} catch (Exception\EmptyRedis) {
|
} catch (Exception\EmptyRedis) {
|
||||||
try {
|
try {
|
||||||
$venta = $ventaService->getById($venta_id);
|
$venta = $ventaService->getById($venta_id);
|
||||||
/*$output['venta'] = [
|
|
||||||
'id' => $venta->id,
|
|
||||||
''
|
|
||||||
];*/
|
|
||||||
$output['venta'] = $venta;
|
$output['venta'] = $venta;
|
||||||
$this->saveRedis($redisService, $redisKey, $output['venta']);
|
$this->saveRedis($redisService, $redisKey, $output['venta']);
|
||||||
} catch (Exception\EmptyResult) {}
|
} catch (Exception\EmptyResult) {}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
namespace Incoviba\Repository;
|
namespace Incoviba\Repository;
|
||||||
|
|
||||||
use PDO;
|
use PDO;
|
||||||
|
use Psr\Log\LoggerInterface;
|
||||||
use Incoviba\Common\Ideal;
|
use Incoviba\Common\Ideal;
|
||||||
use Incoviba\Common\Define;
|
use Incoviba\Common\Define;
|
||||||
use Incoviba\Common\Implement;
|
use Incoviba\Common\Implement;
|
||||||
@ -12,6 +13,7 @@ class Venta extends Ideal\Repository
|
|||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
Define\Connection $connection,
|
Define\Connection $connection,
|
||||||
|
protected LoggerInterface $logger,
|
||||||
protected Venta\Propietario $propietarioRepository,
|
protected Venta\Propietario $propietarioRepository,
|
||||||
protected Venta\Propiedad $propiedadRepository,
|
protected Venta\Propiedad $propiedadRepository,
|
||||||
protected Service\Venta\Pie $pieService,
|
protected Service\Venta\Pie $pieService,
|
||||||
@ -373,7 +375,8 @@ class Venta extends Ideal\Repository
|
|||||||
->joined('JOIN (SELECT ev1.* FROM estado_venta ev1 JOIN (SELECT MAX(id) AS id, venta FROM estado_venta GROUP BY venta) ev0 ON ev0.id = ev1.id) ev ON ev.venta = venta.id')
|
->joined('JOIN (SELECT ev1.* FROM estado_venta ev1 JOIN (SELECT MAX(id) AS id, venta FROM estado_venta GROUP BY venta) ev0 ON ev0.id = ev1.id) ev ON ev.venta = venta.id')
|
||||||
->joined('JOIN tipo_estado_venta tev ON ev.estado = tev.id')
|
->joined('JOIN tipo_estado_venta tev ON ev.estado = tev.id')
|
||||||
->where('venta.id = ?')
|
->where('venta.id = ?')
|
||||||
->group('venta.id');
|
->order('tu.orden')
|
||||||
|
->limit(1);
|
||||||
return $this->connection->execute($query, [$venta_id])->fetch(PDO::FETCH_ASSOC);
|
return $this->connection->execute($query, [$venta_id])->fetch(PDO::FETCH_ASSOC);
|
||||||
}
|
}
|
||||||
public function fetchByIdForList(int $venta_id): array
|
public function fetchByIdForList(int $venta_id): array
|
||||||
|
Reference in New Issue
Block a user