ソースを参照

Merge branch 'develop' of https://forge.laclic.fr/Laclic/CaracoleBundle into develop

packProduct
Fabien Normand 3年前
コミット
3f3ad3d23a
2個のファイルの変更10行の追加4行の削除
  1. +3
    -3
      Repository/Order/OrderShopRepositoryQuery.php
  2. +7
    -1
      Repository/Order/OrderShopStore.php

+ 3
- 3
Repository/Order/OrderShopRepositoryQuery.php ファイルの表示

@@ -152,11 +152,11 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery
->setParameter('year', $year);
}

public function filterByDistributions(array $distributions): self
public function filterByDistributions(array $distributionArray): self
{
return $this
->andWhere('.distribution IN(:distributions)')
->setParameter('distributions', $distributions);
->andWhere('.distribution IN (:distributions)')
->setParameter('distributions', $distributionArray);
}

public function filterByProducts(array $products): self

+ 7
- 1
Repository/Order/OrderShopStore.php ファイルの表示

@@ -89,7 +89,7 @@ class OrderShopStore extends AbstractStore

public function orderByDefault(RepositoryQueryInterface $query): RepositoryQueryInterface
{
$query->orderBy('id', 'DESC');
//$query->orderBy('id', 'DESC');
return $query;
}

@@ -392,6 +392,10 @@ class OrderShopStore extends AbstractStore
$query->filterByDistribution($params['distribution']);
}

if (isset($params['distributions'])) {
$query->filterByDistributions($params['distributions']);
}

if (isset($params['isCart'])) {
$query->filterByStatus(OrderStatusModel::$statusAliasAsCart);
}
@@ -428,6 +432,7 @@ class OrderShopStore extends AbstractStore
if (isset($params['excludeComplementaryOrderShops']) || isset($params['mergeComplementaryOrderShops'])) {
$query->filterIsNullMainOrderShop();
}

if (isset($params['joinProductFamily'])) {
$query->joinProductFamily(true);
}
@@ -442,6 +447,7 @@ class OrderShopStore extends AbstractStore
if (isset($params['groupBy'])) {
$query->groupBy($params['groupBy']);
}

return $query;
}


読み込み中…
キャンセル
保存