src/Leevel/Database/Ddd/Repository.php
public function findPageMacro(int $currentPage, int $perPage = 10, $condition = null, bool $flag = false, array $option = []): array
    {
        $select = $this->entity->selfDatabaseSelect();

        if ($condition) {
            $this->normalizeCondition($condition, $select);
        }

        return $select->pageMacro($currentPage, $perPage, $flag, $option);
    }
public function findPageMacro(int $currentPage, int $perPage = 10, $condition = null, bool $flag = false, array $option = []): array
    {
        $select = $this->entity->selfDatabaseSelect();

        if ($condition) {
            $this->normalizeCondition($condition, $select);
        }

        return $select->pageMacro($currentPage, $perPage, $flag, $option);
    }
创建一个无限数据的分页查询.

@param int                                                            $currentPage
@param int                                                            $perPage
@param null|array|\Closure|\Leevel\Database\Ddd\ISpecification|string $condition
@param bool                                                           $flag
@param array                                                          $option

@return array