查询返回列表数据,增加页码参数,如"pageNum": 1
This commit is contained in:
parent
64b23966ef
commit
2cffc95a53
@ -78,6 +78,8 @@ public class BaseController {
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setRows(list);
|
||||
// 返回 页码
|
||||
rspData.setPageNum(new PageInfo(list).getPageNum());
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
|
||||
@ -15,7 +15,10 @@ public class TableDataInfo implements Serializable {
|
||||
* 总记录数
|
||||
*/
|
||||
private long total;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private long pagenum;
|
||||
/**
|
||||
* 列表数据
|
||||
*/
|
||||
@ -56,6 +59,11 @@ public class TableDataInfo implements Serializable {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public long getPageNum(){return pagenum;}
|
||||
|
||||
public void setPageNum(long pn){ this.pagenum = pn;}
|
||||
|
||||
|
||||
public List<?> getRows() {
|
||||
return rows;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user