![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
MyBatis
dhweicheng
这个作者很懒,什么都没留下…
展开
-
MyBatis数据分页的实现
利用pagehelper实现MyBatis数据的分页功能。 在pom.xml中添加依赖: com.github.pagehelper artifactId>pagehelperartifactId> ${pagehelper.version} mybatis配置文件添加: interceptor="com.github.pagehel原创 2017-02-18 16:32:20 · 402 阅读 · 0 评论 -
MyBatis的批量更新对象
直接上代码: id="updateMenuOrder" parameterType="list"> update resources prefix="set" suffixOverrides=","> prefix="level=case" suffix="end,"> collection="list" item="i" index原创 2017-02-24 12:56:55 · 1423 阅读 · 0 评论 -
pagehelper连接查询分页问题
pagehelper执行数据库连接查询分页数据错误。 原因: pagehelper在连接查询时,对结果进行了count查询,当对象关系为一对多关系时,分页错误。 解决办法: 仅对主表一方进行分页。连接表的数据分开查询即可。 当代码块中有多个查询时,pagehelper 自动对下方最先执行的sql进行分页。原创 2017-06-30 23:34:13 · 7116 阅读 · 0 评论