Skip to content

Commit

Permalink
[TASK] Reduce pagebrowser items in company list view
Browse files Browse the repository at this point in the history
by setting a limit of 750 companies. This is the same amount as for lead list.
  • Loading branch information
einpraegsam committed Feb 16, 2024
1 parent 202f7de commit 82dd35c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Classes/Domain/Repository/CompanyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class CompanyRepository extends AbstractRepository

/**
* @param FilterDto $filter
* @param int $limit
* @return array
* @throws ExceptionDbal
* @throws ExceptionDbalDriver
*/
public function findByFilter(FilterDto $filter): array
public function findByFilter(FilterDto $filter, int $limit = 750): array
{
$sql = 'select c.uid,sum(v.scoring) companyscoring'
. ' from ' . Company::TABLE_NAME . ' c'
Expand All @@ -42,6 +42,7 @@ public function findByFilter(FilterDto $filter): array
$sql .= ' group by c.uid';
$sql .= $this->extendWhereClauseWithFilterCompanyscoring($filter);
$sql .= ' order by companyscoring desc';
$sql .= ' limit ' . $limit;
$connection = DatabaseUtility::getConnectionForTable(Company::TABLE_NAME);
$results = $connection->executeQuery($sql)->fetchAllKeyValue();

Expand Down

0 comments on commit 82dd35c

Please sign in to comment.