|
@@ -56,10 +56,14 @@ class ONURepository extends \Doctrine\ORM\EntityRepository
|
|
|
'o.clientId'
|
|
|
])
|
|
|
->join('o.olt', "olt")
|
|
|
- ->leftJoin('o.nap', "nap")
|
|
|
- ->where('o.tenancyId = :tenancyId')
|
|
|
- ->setParameter('tenancyId', $tenancyId)
|
|
|
- ->orderBy('o.created', 'DESC')
|
|
|
+ ->leftJoin('o.nap', "nap");
|
|
|
+
|
|
|
+ if($tenancyId != 1){
|
|
|
+ $query->where('o.tenancyId = :tenancyId')
|
|
|
+ ->setParameter('tenancyId', $tenancyId);
|
|
|
+ }
|
|
|
+
|
|
|
+ $query->orderBy('o.created', 'DESC')
|
|
|
->setMaxResults($limit)
|
|
|
->setFirstResult($offset);
|
|
|
|