|
|
@@ -21,7 +21,7 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
|
|
|
|
public function __construct(ReductionCatalogRepository $repository, PaginatorInterface $paginator) |
|
|
|
{ |
|
|
|
parent::__construct($repository, 'reductionCatalog', $paginator); |
|
|
|
parent::__construct($repository, 'r', $paginator); |
|
|
|
} |
|
|
|
|
|
|
|
public function joinUsers() |
|
|
@@ -30,8 +30,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
$this->isJoinUsers = true; |
|
|
|
|
|
|
|
return $this |
|
|
|
->leftJoin('.users', 'users') |
|
|
|
->addSelect('users') ; |
|
|
|
->leftJoin('.users', 'pf_users') |
|
|
|
->addSelect('pf_users') ; |
|
|
|
} |
|
|
|
return $this; |
|
|
|
} |
|
|
@@ -42,8 +42,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
$this->isJoinGroupUsers = true; |
|
|
|
|
|
|
|
return $this |
|
|
|
->leftJoin('.groupUsers', 'groupusers') |
|
|
|
->addSelect('groupusers') ; |
|
|
|
->leftJoin('.groupUsers', 'pf_groupusers') |
|
|
|
->addSelect('pf_groupusers') ; |
|
|
|
} |
|
|
|
return $this; |
|
|
|
} |
|
|
@@ -54,8 +54,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
$this->isJoinProductFamilies = true; |
|
|
|
|
|
|
|
return $this |
|
|
|
->leftJoin('.productFamilies', 'productFamilies') |
|
|
|
->addSelect('productFamilies') ; |
|
|
|
->leftJoin('.productFamilies', 'pfs') |
|
|
|
->addSelect('pfs') ; |
|
|
|
} |
|
|
|
return $this; |
|
|
|
} |
|
|
@@ -66,8 +66,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
$this->isJoinProductFamily = true; |
|
|
|
|
|
|
|
return $this |
|
|
|
->leftJoin('.productFamily', 'productFamily') |
|
|
|
->addSelect('productFamily') ; |
|
|
|
->leftJoin('.productFamily', 'pf') |
|
|
|
->addSelect('pf') ; |
|
|
|
} |
|
|
|
return $this; |
|
|
|
} |
|
|
@@ -78,8 +78,8 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
$this->isJoinProductCategories = true; |
|
|
|
|
|
|
|
return $this |
|
|
|
->leftJoin('.productCategories', 'productCategories') |
|
|
|
->addSelect('productCategories') ; |
|
|
|
->leftJoin('.productCategories', 'pcs') |
|
|
|
->addSelect('pcs') ; |
|
|
|
} |
|
|
|
return $this; |
|
|
|
} |
|
|
@@ -129,7 +129,6 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
public function filterConditionProductFamilies(array $productFamilies) |
|
|
|
{ |
|
|
|
$this->joinProductFamilies(); |
|
|
|
$this->joinProductFamily(); |
|
|
|
|
|
|
|
return $this |
|
|
|
->andWhere(':productFamilies MEMBER OF .productFamilies OR .productFamilies is empty') |
|
|
@@ -138,7 +137,6 @@ class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery |
|
|
|
|
|
|
|
public function filterConditionProductFamily(ProductFamilyInterface $productFamily) |
|
|
|
{ |
|
|
|
$this->joinProductFamilies(); |
|
|
|
$this->joinProductFamily(); |
|
|
|
|
|
|
|
return $this |