- mybatis generator selectByExampl
- Spring Boot (七)MyBatis代码自动生成和辅助插
- 七.SpringBoot整合MyBatis代码自动生成插件
- Mybatis-Generator[1] Eclipse 插件的
- SSM框架整合笔记(七)配置Mybatis Generator
- 深入浅出Mybatis-Mybatis-Generator
- 定制MyBatis Generator减少mybatis的使用负
- 使用IDEA +Mybatis Generator生成业务代码
- MyBatis Generator Maven插件使用
- gradle之MyBatis Generator生成model,
1、<select id="selectByExample" 添加
<if test="pageIndex != null and pageSize != null and pageSize != 0">
limit #{pageIndex},#{pageSize}
</if>
2、generator 生成的class ***Example 中添加
private Integer pageIndex;
private Integer pageSize;
public Integer getPageIndex() {
return pageIndex;
}
public void setPageIndex(Integer pageIndex) {
this.pageIndex = pageIndex;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
3、DAO层实现层 *DaoImpl implements *Dao 中方法 set pageIndex/pageSize
public List<*> selectMaintainInfo(MaintainConfigBean request, Integer pageIndex,Integer pageSize) {
Example example = new Example();
example.setPageIndex(pageIndex);
example.setPageSize(pageSize);
网友评论