|
|
@@ -85,6 +85,10 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt |
|
|
|
{ |
|
|
|
$query = $this->findByMerchantQuery() ; |
|
|
|
|
|
|
|
if(isset($params['count']) && $params['count']) { |
|
|
|
$query->select('count(e.id)') ; |
|
|
|
} |
|
|
|
|
|
|
|
if(isset($params['dateStart']) || isset($params['dateEnd'])) { |
|
|
|
$params['dateField'] = isset($params['dateField']) ? $params['dateField'] : 'validationDate' ; |
|
|
|
} |
|
|
@@ -120,6 +124,11 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt |
|
|
|
$query->addOrderBy('deliverySlotPointSale.day', 'ASC') ; |
|
|
|
$query->addOrderBy('deliverySlotPointSale.timeStart', 'ASC') ; |
|
|
|
|
|
|
|
return $query->getQuery()->getResult() ; |
|
|
|
if(isset($params['count']) && $params['count']) { |
|
|
|
return $query->getQuery()->getSingleScalarResult(); |
|
|
|
} |
|
|
|
else { |
|
|
|
return $query->getQuery()->getResult() ; |
|
|
|
} |
|
|
|
} |
|
|
|
} |