mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
commit
18fb66ca6f
@ -595,9 +595,10 @@ public interface BaseMapper<T> {
|
||||
|
||||
//重置 selectColumns
|
||||
CPI.setSelectColumns(queryWrapper, selectColumns);
|
||||
|
||||
int offset = page.getPageSize() * (page.getPageNumber() - 1);
|
||||
queryWrapper.limit(offset, page.getPageSize());
|
||||
//分页pageSize,最大值限制
|
||||
int pageSize = Math.min(page.getPageSize(), 10000);
|
||||
int offset = pageSize * (page.getPageNumber() - 1);
|
||||
queryWrapper.limit(offset, pageSize);
|
||||
List<T> rows = selectListByQuery(queryWrapper);
|
||||
page.setRecords(rows);
|
||||
return page;
|
||||
|
||||
@ -29,6 +29,16 @@
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure-processor</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mybatis.scripting</groupId>
|
||||
<artifactId>mybatis-freemarker</artifactId>
|
||||
|
||||
12
pom.xml
12
pom.xml
@ -133,6 +133,18 @@
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure-processor</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user