mirror of https://gitee.com/maxjhandsome/pig
fiexd IILJO 修复通用排序组件无效问题
This commit is contained in:
parent
b644fce92a
commit
acbda2b7b0
|
@ -18,11 +18,6 @@ public class Query<T> extends Page<T> {
|
|||
public Query(Map<String, Object> params) {
|
||||
super(Integer.parseInt(params.getOrDefault(PAGE, 1).toString())
|
||||
, Integer.parseInt(params.getOrDefault(LIMIT, 10).toString()));
|
||||
params.remove(PAGE);
|
||||
params.remove(LIMIT);
|
||||
params.remove(ORDER_BY_FIELD);
|
||||
params.remove(IS_ASC);
|
||||
this.setCondition(params);
|
||||
|
||||
String orderByField = params.getOrDefault(ORDER_BY_FIELD, "").toString();
|
||||
if (StringUtils.isNotEmpty(orderByField)) {
|
||||
|
@ -31,5 +26,11 @@ public class Query<T> extends Page<T> {
|
|||
|
||||
Boolean isAsc = Boolean.parseBoolean(params.getOrDefault(IS_ASC, Boolean.TRUE).toString());
|
||||
this.setAsc(isAsc);
|
||||
|
||||
params.remove(PAGE);
|
||||
params.remove(LIMIT);
|
||||
params.remove(ORDER_BY_FIELD);
|
||||
params.remove(IS_ASC);
|
||||
this.setCondition(params);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue