摘要: 一、where 向sql里面追加where,如果where里面没有内容,则不显示 ;如果where后面紧接着 and or等等关键字,它会默认去掉 <select id="selectAll" resultType="com.gx.domain.User"> select * from user < 阅读全文
posted @ 2020-04-24 22:17 青青子衿啊 阅读(178) 评论(0) 推荐(0)
摘要: 一、resultMap 用来处理查询结果的字段和实体类里面的属性名不一致的问题 <!-- 处理查询结果的字段和实体类里面的属性名不一致的问题--> <resultMap type="com.gx.domain.User" id="BaseResultMap"> <id property="id" c 阅读全文
posted @ 2020-04-24 21:24 青青子衿啊 阅读(310) 评论(0) 推荐(0)
摘要: 一、下载jar包并导入 jsqlparser-1.3.jar,下载地址: https://mvnrepository.com/artifact/com.github.jsqlparser/jsqlparser/1.3 pagehelper-5.1.6.jar,下载地址:https://mvnrepo 阅读全文
posted @ 2020-04-24 21:09 青青子衿啊 阅读(850) 评论(1) 推荐(0)
摘要: 一、总结了mybatis中五种不同实现分页查询的方法 UserMapper.java接口文件 public interface UserMapper { //分页查询 public List<User> selectForPage1(int startIndex,int pageSize); pub 阅读全文
posted @ 2020-04-24 20:55 青青子衿啊 阅读(27171) 评论(0) 推荐(1)