mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
修复分页时order by截断问题
This commit is contained in:
parent
59e1c64467
commit
5c835ef888
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user