class SelectEntityService {

    public ListResult<TaskSqlView> findSelectEntityPageList(Paging<TaskSql> paging) throws SQLException {
        Long count = selectEntityDao.getSelectEntityTotalCount(paging);
        return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> {
            List<TaskSqlView> list = selectEntityDao.findSelectEntityPageList(paging);
            if (CollectionUtils.isEmpty(list)) {
                return Collections.emptyList();
            }
            return list;
        });
    }

}