2020
10-10
10-10
Mybatis Plus 自定义方法实现分页功能的示例代码
一般物理分页,即通过sql语句分页,都是在sql语句后面添加limit分页语句,在xml文件里传入分页的参数,再多配置一条sql,用于查询总数:<selectid="queryStudentsBySql"parameterType="map"resultMap="studentmapper">select*fromstudentlimit#{currIndex},#{pageSize}</select><selectid="queryStudentsCount"resultType="java.lang.Integer"parameterType="java.util.Map">selectcount(...
继续阅读 >