<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                Guns中前端表格用的[Bootstrap Table](http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/)插件,在前端執行查詢時,插件會自動往后臺傳遞分頁參數,并且默認的格式如下,? ![image_1c4msjlp71qb61b9bqlg9q4154i6v.png-54.5kB](https://img-blog.csdnimg.cn/20181228174637699) `Bootstrap Table`會傳遞`order(升序或者降序)`,`offset(每頁偏移量)`,`limit(每頁條數)`,`sort(排序的字段)`這四個參數,與之對應,后臺封裝了一個通用的接受分頁參數的類`PageFactory`,從而不用每次都來`request.getParameter()`這樣接收參數,如下所示, ``` public class PageFactory<T> { public Page<T> defaultPage() { HttpServletRequest request = HttpKit.getRequest(); int limit = Integer.valueOf(request.getParameter("limit")); //每頁多少條數據 int offset = Integer.valueOf(request.getParameter("offset")); //每頁的偏移量(本頁當前有多少條) String sort = request.getParameter("sort"); //排序字段名稱 String order = request.getParameter("order"); //asc或desc(升序或降序) if (ToolUtil.isEmpty(sort)) { Page<T> page = new Page<>((offset / limit + 1), limit); page.setOpenSort(false); return page; } else { Page<T> page = new Page<>((offset / limit + 1), limit, sort); if (Order.ASC.getDes().equals(order)) { page.setAsc(true); } else { page.setAsc(false); } return page; } } } ``` 在后臺代碼中如需接收參數,構建分頁Page對象的時候,只需如下這樣一調用即可構建分頁對象 ``` Page<OperationLog> page = new PageFactory<OperationLog>().defaultPage(); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看