fiexd IILJO 修复通用排序组件无效问题

This commit is contained in:
冷冷 2018-03-27 23:28:05 +08:00
parent b644fce92a
commit acbda2b7b0
1 changed files with 6 additions and 5 deletions

View File

@ -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);
}
}