mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
fix: 循环分页查询时,count 语句带有 limit 子句。
This commit is contained in:
parent
0a0c772848
commit
dc3cf163ff
@ -685,6 +685,11 @@ public interface BaseMapper<T> {
|
||||
MapperUtil.queryFields(this, records, consumers);
|
||||
page.setRecords(records);
|
||||
}
|
||||
|
||||
// 将之前设置的 limit 清除掉
|
||||
CPI.setLimitRows(queryWrapper, null);
|
||||
CPI.setLimitOffset(queryWrapper, null);
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@ -464,6 +464,11 @@ public interface RowMapper {
|
||||
|
||||
List<Row> records = selectListByQuery(schema,tableName, queryWrapper);
|
||||
page.setRecords(records);
|
||||
|
||||
// 将之前设置的 limit 清除掉
|
||||
CPI.setLimitRows(queryWrapper, null);
|
||||
CPI.setLimitOffset(queryWrapper, null);
|
||||
|
||||
return page;
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user