分頁插件 PageHelper自定義Count查詢


增加手寫 count 查詢支持

  • 5.0.4 - 2017-08-01

分頁插件會優先通過當前查詢的 msId + countSuffix 查找手寫的分頁查詢。

如果存在就使用手寫的 count 查詢,如果不存在,仍然使用之前的方式自動創建 count 查詢。

例如,如果存在下面兩個查詢:

<select id="selectLeftjoin" resultType="com.github.pagehelper.model.User">
    select a.id,b.name,a.py from user a
    left join user b on a.id = b.id
    order by a.id
</select>
<select id="selectLeftjoin_COUNT" resultType="Long">
    select count(distinct a.id) from user a
    left join user b on a.id = b.id
</select>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM