瀏覽代碼

Bons cadeaux] Correctif filtre bons cadeaux

packProduct
Guillaume 3 年之前
父節點
當前提交
74697bf8be
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. +2
    -2
      EventSubscriber/User/InitUserMerchantEventSubscriber.php
  2. +2
    -2
      Repository/Reduction/ReductionCreditRepositoryQuery.php

+ 2
- 2
EventSubscriber/User/InitUserMerchantEventSubscriber.php 查看文件

@@ -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 查看文件

@@ -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()

Loading…
取消
儲存