|
|
@@ -29,11 +29,12 @@ class TicketRepository extends BaseRepository implements DefaultRepositoryInterf |
|
|
|
return $query ; |
|
|
|
} |
|
|
|
|
|
|
|
public function findAllOpen() |
|
|
|
public function findAllOpen($limit=0) |
|
|
|
{ |
|
|
|
$query = $this->findByMerchantQuery() ; |
|
|
|
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ; |
|
|
|
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN]) ; |
|
|
|
$query->addOrderBy('e.id', 'DESC') ; |
|
|
|
$query->setMaxResults($limit); |
|
|
|
return $query->getQuery()->getResult() ; |
|
|
|
} |
|
|
|
|
|
|
@@ -41,7 +42,7 @@ class TicketRepository extends BaseRepository implements DefaultRepositoryInterf |
|
|
|
{ |
|
|
|
$query = $this->findByMerchantQuery() ; |
|
|
|
$query->select('count(e.id)'); |
|
|
|
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ; |
|
|
|
$this->filterStatus($query, [Ticket::TICKET_STATUS_OPEN]) ; |
|
|
|
return $query->getQuery()->getSingleScalarResult() ; |
|
|
|
} |
|
|
|
} |