<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] #### pom.xml引入 ~~~ <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <version>5.1.6</version> </dependency> ~~~ #### 分頁包裝類 ~~~ package com.blog.util; import com.github.pagehelper.PageInfo; import lombok.Data; import java.util.List; @Data public class PageWrap<T extends List>{ private T data; private int pageSize; private int totalPage; private int recordCount; public PageWrap() { } public PageWrap(T t, int recordCount, int pageSize) { this.data = t; this.recordCount = recordCount; this.pageSize = pageSize; this.totalPage = computeTotalPage(recordCount, pageSize); } public static int computeTotalPage(int recordCount, int pageSize) { if (recordCount % pageSize == 0) { return recordCount / pageSize; } else { return recordCount / pageSize + 1; } } public static <T extends List> PageWrap<T> createPageWrap(T data, int recordCount, int pageSize) { return new PageWrap<T>(data, recordCount, pageSize); } public static <T extends List> PageWrap<T> createPageWrap(T data, int pageSize) { PageInfo pageInfo = new PageInfo(data); return new PageWrap<T>(data, (int) pageInfo.getTotal(), pageSize); } } ~~~ service ~~~ public interface ArticleService { PageWrap<List<Article>> getALLArticel(Integer is_hot); } ~~~ #### 實現類 ~~~ @Service public class ArticleImpl implements ArticleService { @Autowired private ArticleMapper articleMapper; /** * @desc: 獲取文章列表 * @author: cfun * @date: 2019-11-08 **/ @Override public PageWrap<List<Article>> getALLArticel(Integer is_hot) { //判斷賬號是否已經存在 List<Article> articleList = articleMapper.selectByExampleWithBLOBs(is_hot); return PageWrap.createPageWrap(articleList,1,10); } } ~~~
                  <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>

                              哎呀哎呀视频在线观看