Commit 3855348d authored by yanzg's avatar yanzg

处理分页重复提示BUG

parent 10fe9b0a
......@@ -532,6 +532,7 @@ public abstract class BaseDaoSql {
sqlTo = sqlTo.trim();
// 查询总数据量
String sqlSize = "SELECT COUNT(1) FROM (" +
// 去掉最后一个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")
......
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