Kaynağa Gözat

Bons cadeaux] Correctif filtre bons cadeaux

packProduct
Guillaume 3 yıl önce
ebeveyn
işleme
74697bf8be
2 değiştirilmiş dosya ile 4 ekleme ve 4 silme
  1. +2
    -2
      EventSubscriber/User/InitUserMerchantEventSubscriber.php
  2. +2
    -2
      Repository/Reduction/ReductionCreditRepositoryQuery.php

+ 2
- 2
EventSubscriber/User/InitUserMerchantEventSubscriber.php Dosyayı Görüntüle

@@ -36,7 +36,7 @@ class InitUserMerchantEventSubscriber implements EventSubscriberInterface

public function createUserMerchant(EntityManagerEvent $event)
{
$user = $event->getEntity();
/* $user = $event->getEntity();
$entityRepository = $this->em->getRepository(get_class($user));
if ($user instanceof UserInterface) {
$existingUser = $entityRepository->findOneByEmail($user->getEmail());
@@ -52,7 +52,7 @@ class InitUserMerchantEventSubscriber implements EventSubscriberInterface
);
$this->em->create($userMerchant);
}
}
}*/
}



+ 2
- 2
Repository/Reduction/ReductionCreditRepositoryQuery.php Dosyayı Görüntüle

@@ -44,13 +44,13 @@ class ReductionCreditRepositoryQuery extends AbstractRepositoryQuery
public function filterInactive()
{
$this->joinUsers();
return $this->having('COUNT(users.id) = 0');
return $this->andWhere('.users IS EMPTY');
}

public function filterActive()
{
$this->joinUsers();
return $this->having('COUNT(users.id) > 0');
return $this->andWhere('.users IS NOT EMPTY');
}

public function joinUsers()

Yükleniyor…
İptal
Kaydet