|
123456789101112131415161718192021222324252627282930313233 |
- <?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]) ;
- return $query->getQuery()->getResult() ;
- }
- }
-
|