mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复分页时order by截断问题
This commit is contained in:
@@ -272,7 +272,7 @@ public class DialectRunner implements Serializable {
|
||||
|
||||
String selectSql = sqlBuilder.build();
|
||||
// 去除order by 子句
|
||||
final int orderByIndex = StrUtil.indexOfIgnoreCase(selectSql, " order by");
|
||||
final int orderByIndex = StrUtil.lastIndexOfIgnoreCase(selectSql, " order by");
|
||||
if (orderByIndex > 0) {
|
||||
selectSql = StrUtil.subPre(selectSql, orderByIndex);
|
||||
}
|
||||
|
Reference in New Issue
Block a user