|
123456789101112131415161718192021222324252627282930313233 |
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Doctrine\ORM\EntityManager;
- use Lc\ShopBundle\Context\DefaultRepositoryInterface;
- use Lc\ShopBundle\Context\MerchantUtilsInterface;
- use Lc\ShopBundle\Context\ReductionCreditInterface;
-
-
- class ReductionCreditRepository extends BaseRepository implements DefaultRepositoryInterface
- {
-
- public function getInterfaceClass()
- {
- return ReductionCreditInterface::class;
- }
-
-
- public function findReductionCreditsByUser($user)
- {
- $query = $this->findByMerchantQuery() ;
- $query->andWhere('e.status = 1');
- $query->andWhere(':user MEMBER OF e.users');
- $query->setParameter('user', $user);
- return $query->getQuery()->getResult() ;
- }
- }
|