Commit 375df04c authored by yanzg's avatar yanzg

处理分页重复提示BUG

parent 51eecf97
...@@ -535,7 +535,7 @@ public abstract class BaseDaoSql { ...@@ -535,7 +535,7 @@ public abstract class BaseDaoSql {
// 去掉最后一个order by // 去掉最后一个order by
sqlTo.replaceAll("(?i)(ORDER\\s+BY\\s+[^)]+){0,1}(limit\\s+\\d+,\\d+\\s*){0,1}$", "") sqlTo.replaceAll("(?i)(ORDER\\s+BY\\s+[^)]+){0,1}(limit\\s+\\d+,\\d+\\s*){0,1}$", "")
// 去掉第一个 SELECT a.* // 去掉第一个 SELECT a.*
.replaceAll("(^SELECT)\\s+a.\\*", "$1 1 AS __id") .replaceAll("(^SELECT)\\s+a\\.\\*", "$1 1 AS __id")
+ ") t"; + ") t";
data.setPageTotal(StringHelper.toInt(queryCellWithCache(String.format("%s.Size", sqlName), sqlSize, paras.toArray()))); 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