本文整理了Java中org.hsweb.web.bean.common.QueryParam.rePaging
方法的一些代码示例,展示了QueryParam.rePaging
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryParam.rePaging
方法的具体详情如下:
包路径:org.hsweb.web.bean.common.QueryParam
类名称:QueryParam
方法名:rePaging
暂无
代码示例来源:origin: org.hsweb/hsweb-web-service-simple
@Override
public PagerResult<QuartzJobHistory> selectPager(QueryParam param) {
PagerResult<QuartzJobHistory> result = new PagerResult<>();
int total = total(param);
result.setTotal(total);
param.rePaging(total);
result.setData(select(param));
return result;
}
代码示例来源:origin: org.hsweb/hsweb-web-service-simple
@Override
default PagerResult<Po> selectPager(QueryParam param) {
PagerResult<Po> pagerResult = new PagerResult<>();
param.setPaging(false);
int total = getQueryMapper().total(param);
pagerResult.setTotal(total);
if (total == 0) {
pagerResult.setData(new ArrayList<>());
} else {
//根据实际记录数量重新指定分页参数
param.rePaging(total);
pagerResult.setData(getQueryMapper().select(param));
}
return pagerResult;
}
代码示例来源:origin: org.hsweb/hsweb-web-service-simple
@Override
@ReadLock
@LockName(value = "'form.lock.'+#name", isExpression = true)
@Transactional(readOnly = true)
public <T> PagerResult<T> selectPager(String name, QueryParam param) throws SQLException {
PagerResult<T> result = new PagerResult<>();
RDBTable<T> table = getTableByName(name);
RDBQuery<T> query = table.createQuery();
query.setParam(param);
int total = query.total();
result.setTotal(total);
if (total == 0) {
result.setData(new ArrayList<>());
} else {
//根据实际记录数量重新指定分页参数
param.rePaging(total);
result.setData(query.list(param.getPageIndex(), param.getPageSize()));
}
return result;
}
代码示例来源:origin: org.hsweb/hsweb-web-controller
/**
* 获取最新版本的表单列表
*
* @param param 查询参数
* @return {@link GenericController#list(QueryParam)}
*/
@RequestMapping(value = "/~latest", method = RequestMethod.GET)
@AccessLogger("获取最新版列表")
public ResponseMessage latestList(QueryParam param) {
ResponseMessage message;
if (!param.isPaging()) {
message = ok(formService.selectLatestList(param));
} else {
param.setPaging(false);
int total = formService.countLatestList(param);
param.rePaging(total);
List<Form> list = formService.selectLatestList(param);
PagerResult<Form> result = new PagerResult<>();
result.setData(list).setTotal(total);
message = ok(result);
}
message.include(Form.class, param.getIncludes())
.exclude(Form.class, param.getExcludes())
.onlyData();
return message;
}
内容来源于网络,如有侵权,请联系作者删除!