Home  >  Article  >  Java  >  java study guide

java study guide

高洛峰
高洛峰Original
2016-11-17 14:04:161093browse

@Override
    public BaseResponse selectListPage(PageData page, Object obj) {
        BaseResponse response = new BaseResponse();
        PageHelper.startPage(page.getPage(), page.getNumber(), true);
        List<Object> list =  getSqlSession().selectList(getStatement(BasicExecuteEnum.SELECT_LIST.id), obj);
        response.setObj(list);
        response.setPageInfo(new PageInfo<Object>(list));
        return response;
    }

    @Override
    public BaseResponse selectListPage(PageData page, String statement,
            Object obj) {
        BaseResponse response = new BaseResponse();
        PageHelper.startPage(page.getPage(), page.getNumber(), true);
        List<Object> list =  getSqlSession().selectList(getStatement(statement), obj);
        response.setObj(list);
        response.setPageInfo(new PageInfo<Object>(list));
        return response;
    }


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn