Commit 51eecf97 authored by yanzg's avatar yanzg

处理分页重复提示BUG

parent 3855348d
......@@ -535,7 +535,7 @@ public abstract class BaseDaoSql {
// 去掉最后一个order by
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")
.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