Rose框架中controller分页

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:

猜你喜欢

转载自blog.csdn.net/m0_37089544/article/details/62891084