修复page方法会打印两次count语句的问题

This commit is contained in:
mxd
2021-10-15 20:25:53 +08:00
parent 359aaea28e
commit ec44e63d5b

View File

@@ -467,7 +467,7 @@ public class SQLModule extends HashMap<String, SQLModule> implements MagicModule
assertDatasourceNotNull();
Dialect dialect = dataSourceNode.getDialect(dialectAdapter);
BoundSql countBoundSql = boundSql.copy(dialect.getCountSql(boundSql.getSql()));
int count = countBoundSql.getCacheValue(this.sqlInterceptors, () -> selectInt(countBoundSql));
int count = selectInt(countBoundSql);
return page(count, boundSql, page, dialect);
}