Commit 10fe9b0a authored by yanzg's avatar yanzg

处理分页重复提示BUG

parent 92cb1375
......@@ -533,6 +533,7 @@ public abstract class BaseDaoSql {
// 查询总数据量
String sqlSize = "SELECT COUNT(1) FROM (" +
sqlTo.replaceAll("(?i)(ORDER\\s+BY\\s+[^)]+){0,1}(limit\\s+\\d+,\\d+\\s*){0,1}$", "")
// 去掉第一个 SELECT a.*
.replaceAll("(^SELECT)\\s+a.*", "$1 1 AS __id")
+ ") t";
data.setPageTotal(StringHelper.toInt(queryCellWithCache(String.format("%s.Size", sqlName), sqlSize, paras.toArray())));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment