選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

31 行
992B

  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use Lc\ShopBundle\Context\DefaultRepositoryInterface;
  4. use Lc\ShopBundle\Context\VisitorInterface;
  5. /**
  6. * @method VisitorInterface|null find($id, $lockMode = null, $lockVersion = null)
  7. * @method VisitorInterface|null findOneBy(array $criteria, array $orderBy = null)
  8. * @method VisitorInterface[] findAll()
  9. * @method VisitorInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  10. */
  11. class VisitorRepository extends BaseRepository implements DefaultRepositoryInterface
  12. {
  13. public function getInterfaceClass()
  14. {
  15. return VisitorInterface::class;
  16. }
  17. public function findOldVisitors($date){
  18. $qb = $this->createQueryBuilder('v');
  19. $qb->where('v.lastAccess < :date');
  20. $qb->andWhere('v.totalVisit = 1');
  21. $qb->setParameter('date', $date);
  22. return $qb->getQuery()->getResult();
  23. }
  24. }