This commit is contained in:
@ -127,4 +127,21 @@ class FirstCompanyRepository extends AbstractRepository
|
||||
}
|
||||
return $company ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司列表.
|
||||
* @param int|string $page
|
||||
* @param int|string $pageSize
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws Exception
|
||||
*/
|
||||
public function getList(int|string $page, int|string $pageSize, array $params = []): array
|
||||
{
|
||||
$fields = $this->dao->getFields();
|
||||
$query = $this->dao->builder()->select($fields);
|
||||
// 构建查询条件
|
||||
$this->dao->buildWhere($query, $params);
|
||||
return $this->dao->paginate($query, compact('page', 'pageSize'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user