mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复分页时order by截断问题
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# 5.8.10.M1 (2022-10-22)
|
||||
# 5.8.10.M1 (2022-10-23)
|
||||
|
||||
### 🐣新特性
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【db 】 修复分页时order by截断问题(issue#I5X6FM@Gitee)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
# 5.8.9 (2022-10-22)
|
||||
|
@@ -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