@Override
    public PageResult<Client> listClient(Map<String, Object> params, boolean isPage) {
        Page<Client> page;
        if (isPage) {
            page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit"));
        } else {
            page = new Page<>(1, -1);
        }
        List<Client> list = baseMapper.findList(page, params);
        page.setRecords(list);
        return PageResult.<Client>builder().data(list).code(0).count(page.getTotal()).build();
    }
@author zlt
<p>
Blog: http://zlt2000.gitee.io
Github: https://github.com/zlt2000
zlt-uaa/src/main/java/com/central/oauth/service/impl/ClientServiceImpl.java