|
12345678910111213141516171819202122232425262728293031323334 |
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
- use Doctrine\Persistence\ManagerRegistry;
- use Lc\ShopBundle\Context\DefaultRepositoryInterface;
- use Lc\ShopBundle\Context\TicketInterface;
- use Lc\ShopBundle\Context\UnitInterface;
- use Lc\ShopBundle\Model\Ticket;
- use Lc\ShopBundle\Repository\BaseRepository;
-
- /**
- * @method TicketInterface|null find($id, $lockMode = null, $lockVersion = null)
- * @method TicketInterface|null findOneBy(array $criteria, array $orderBy = null)
- * @method TicketInterface[] findAll()
- * @method TicketInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
- */
- class TicketRepository extends BaseRepository implements DefaultRepositoryInterface
- {
- public function getInterfaceClass()
- {
- return TicketInterface::class;
- }
-
- public function findAllOpen()
- {
- $query = $this->findByMerchantQuery() ;
- $query->andWhere('e.status IN (:statusOpen)')->setParameter('statusOpen', [Ticket::TICKET_STATUS_OPEN, Ticket::TICKET_STATUS_BEING_PROCESSED]) ;
- $query->addOrderBy('e.id', 'DESC') ;
- return $query->getQuery()->getResult() ;
- }
- }
-
|