mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28: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);
|
MapperUtil.queryFields(this, records, consumers);
|
||||||
page.setRecords(records);
|
page.setRecords(records);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 将之前设置的 limit 清除掉
|
||||||
|
CPI.setLimitRows(queryWrapper, null);
|
||||||
|
CPI.setLimitOffset(queryWrapper, null);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -464,6 +464,11 @@ public interface RowMapper {
|
|||||||
|
|
||||||
List<Row> records = selectListByQuery(schema,tableName, queryWrapper);
|
List<Row> records = selectListByQuery(schema,tableName, queryWrapper);
|
||||||
page.setRecords(records);
|
page.setRecords(records);
|
||||||
|
|
||||||
|
// 将之前设置的 limit 清除掉
|
||||||
|
CPI.setLimitRows(queryWrapper, null);
|
||||||
|
CPI.setLimitOffset(queryWrapper, null);
|
||||||
|
|
||||||
return page;
|
return page;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user