您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

33 行
1.1KB

  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use Lc\ShopBundle\Context\DefaultRepositoryInterface;
  4. use Lc\ShopBundle\Context\PointSaleInterface;
  5. /**
  6. * @method PointSaleInterface|null find($id, $lockMode = null, $lockVersion = null)
  7. * @method PointSaleInterface|null findOneBy(array $criteria, array $orderBy = null)
  8. * @method PointSaleInterface[] findAll()
  9. * @method PointSaleInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  10. */
  11. class PointSaleRepository extends BaseRepository implements DefaultRepositoryInterface
  12. {
  13. public function getInterfaceClass()
  14. {
  15. return PointSaleInterface::class;
  16. }
  17. public function findAllByMerchant()
  18. {
  19. return $this->createQueryBuilder('e')
  20. ->where(':currentMerchant MEMBER OF e.merchants')
  21. ->andWhere('e.status = 1')
  22. ->setParameter('currentMerchant', $this->merchantUtils->getMerchantCurrent())
  23. ->getQuery()
  24. ->getResult() ;
  25. }
  26. }