|
123456789101112131415161718192021222324252627282930 |
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Lc\ShopBundle\Context\DefaultRepositoryInterface;
- use Lc\ShopBundle\Context\VisitorInterface;
-
- /**
- * @method VisitorInterface|null find($id, $lockMode = null, $lockVersion = null)
- * @method VisitorInterface|null findOneBy(array $criteria, array $orderBy = null)
- * @method VisitorInterface[] findAll()
- * @method VisitorInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
- */
- class VisitorRepository extends BaseRepository implements DefaultRepositoryInterface
- {
- public function getInterfaceClass()
- {
- return VisitorInterface::class;
- }
-
-
- public function findOldVisitors($date){
- $qb = $this->createQueryBuilder('v');
- $qb->where('v.lastAccess < :date');
- $qb->andWhere('v.totalVisit = 1');
- $qb->setParameter('date', $date);
- return $qb->getQuery()->getResult();
-
- }
- }
|