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

MerchantRepository.php 873B

4 年前
4 年前
4 年前
123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Lc\ShopBundle\Repository;
  3. use Doctrine\ORM\EntityRepository;
  4. use Lc\ShopBundle\Context\MerchantInterface;
  5. /**
  6. * @method MerchantInterface|null find($id, $lockMode = null, $lockVersion = null)
  7. * @method MerchantInterface|null findOneBy(array $criteria, array $orderBy = null)
  8. * @method MerchantInterface[] findAll()
  9. * @method MerchantInterface[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
  10. */
  11. class MerchantRepository extends EntityRepository
  12. {
  13. public function findAllWithConfigs()
  14. {
  15. $qb = $this->createQueryBuilder('hub');
  16. $qb->innerJoin('hub.merchantConfigs', 'merchant_configs');
  17. return $qb->getQuery()->getResult();
  18. }
  19. public function getInterfaceClass()
  20. {
  21. return MerchantInterface::class;
  22. }
  23. }