Rose框架中controller分页

来源:互联网 发布:mysql skipnetworking 编辑:程序博客网 时间:2024/06/07 00:40

Rose框架中的Controller层的分页(数据库用的Mysql):

// 分页

              int page = Integer.parseInt(inv.getParameter("page"));

              int rows = Integer.parseInt(inv.getParameter("rows"));

              int start = (page - 1) * rows;

              int total = service.getCountById(null);

  JSONObject result = new JSONObject();

  。。。。。。。

json.setStatus(true);

              json.set("rows",findSpLgInfo);

              json.set("total",total);

  return json.toJson();

//注意

page:

rows:

start:

total:

0 0
原创粉丝点击