mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
fix: 解决orderBy时传入的变量失效问题(添加对orderBys判空)
This commit is contained in:
parent
0edf12b05d
commit
8a21cf48d0
@ -2352,10 +2352,12 @@ public class QueryWrapper extends BaseQueryWrapper<QueryWrapper> {
|
||||
Object[] paramValues = ArrayUtil.concat(whereValues, havingValues);
|
||||
|
||||
// orderBy 参数
|
||||
for (QueryOrderBy orderBy : orderBys) {
|
||||
QueryColumn orderByColumn = orderBy.queryColumn;
|
||||
if (orderByColumn != null && orderByColumn instanceof HasParamsColumn) {
|
||||
paramValues = ArrayUtil.concat(paramValues, ((HasParamsColumn) orderByColumn).getParamValues());
|
||||
if (CollectionUtil.isNotEmpty(orderBys)) {
|
||||
for (QueryOrderBy orderBy : orderBys) {
|
||||
QueryColumn orderByColumn = orderBy.queryColumn;
|
||||
if (orderByColumn != null && orderByColumn instanceof HasParamsColumn) {
|
||||
paramValues = ArrayUtil.concat(paramValues, ((HasParamsColumn) orderByColumn).getParamValues());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user