瀏覽代碼

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

develop
Guillaume 3 年之前
父節點
當前提交
f3c575bff1
共有 1 個檔案被更改,包括 0 行新增15 行删除
  1. +0
    -15
      ShopBundle/Repository/OrderShopRepository.php

+ 0
- 15
ShopBundle/Repository/OrderShopRepository.php 查看文件

@@ -313,20 +313,5 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
}


public function countValidOrderProductsOfWeekByProduct($weekNumber, $productId)
{
$query = $this->findByMerchantQuery();
$query = $this->filterOrderValid($query);
$query->andWhere('e.weekNumber = :weekNumber');
$query->setParameter('weekNumber', $weekNumber);
$query->leftJoin('e.orderProducts', 'orderProduct');
$query->andWhere('orderProduct.product = :product');
$query->setParameter('product', $productId);
$query->select('SUM(orderProduct.quantityOrder) as quantity');

$result = $query->getQuery()->getOneOrNullResult();

return $result['quantity'];

}
}

Loading…
取消
儲存