瀏覽代碼

OrderShopRepositoryQuery : ajout joinDistribution() dans filterByDistributions()

develop
Guillaume Bourgeois 1 年之前
父節點
當前提交
caa9368e96
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      Repository/Order/OrderShopRepositoryQuery.php

+ 1
- 1
Repository/Order/OrderShopRepositoryQuery.php 查看文件

@@ -61,7 +61,6 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery
public function selectSum(): self
{
$this->joinProduct();
$this->joinDistribution();
return $this
->select(
'SUM(orderProducts.quantityOrder) as quantity, distribution.cycleNumber as cycleNumber, distribution.year as year , product.id as productId'
@@ -161,6 +160,7 @@ class OrderShopRepositoryQuery extends AbstractRepositoryQuery

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

Loading…
取消
儲存