createPageCountSql
This commit is contained in:
@@ -159,7 +159,7 @@ public abstract class AbstractDataSqlSource extends AbstractDataSource
|
|||||||
readConfProps.getProperty(DATA_SOURCE_SLOWMS_ERROR, "3000").trim());
|
readConfProps.getProperty(DATA_SOURCE_SLOWMS_ERROR, "3000").trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected <T> PageCountSql filterPageCountSql(
|
protected <T> PageCountSql createPageCountSql(
|
||||||
EntityInfo<T> info,
|
EntityInfo<T> info,
|
||||||
final boolean readCache,
|
final boolean readCache,
|
||||||
boolean needTotal,
|
boolean needTotal,
|
||||||
|
|||||||
@@ -2390,7 +2390,7 @@ public class DataJdbcSource extends AbstractDataSqlSource {
|
|||||||
try {
|
try {
|
||||||
conn = readPool.pollConnection();
|
conn = readPool.pollConnection();
|
||||||
conn.setAutoCommit(true);
|
conn.setAutoCommit(true);
|
||||||
PageCountSql sqls = filterPageCountSql(info, readCache, needTotal, distinct, sels, tables, flipper, node);
|
PageCountSql sqls = createPageCountSql(info, readCache, needTotal, distinct, sels, tables, flipper, node);
|
||||||
try {
|
try {
|
||||||
return executeQuerySheet(info, needTotal, flipper, sels, s, conn, sqls);
|
return executeQuerySheet(info, needTotal, flipper, sels, s, conn, sqls);
|
||||||
} catch (SQLException se) {
|
} catch (SQLException se) {
|
||||||
@@ -2429,7 +2429,7 @@ public class DataJdbcSource extends AbstractDataSqlSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 重新查询一次
|
// 重新查询一次
|
||||||
sqls = filterPageCountSql(info, readCache, needTotal, distinct, sels, tables, flipper, node);
|
sqls = createPageCountSql(info, readCache, needTotal, distinct, sels, tables, flipper, node);
|
||||||
return executeQuerySheet(info, needTotal, flipper, sels, s, conn, sqls);
|
return executeQuerySheet(info, needTotal, flipper, sels, s, conn, sqls);
|
||||||
} else {
|
} else {
|
||||||
throw new SourceException(se);
|
throw new SourceException(se);
|
||||||
|
|||||||
Reference in New Issue
Block a user