提交 e0ab321f 编写于 作者: sq3536's avatar sq3536

url 兼容map

上级 578ff47f
......@@ -27,6 +27,20 @@ public class FilterData<T> extends BaseData
return this;
}
public FilterData setAll(Map map)
{
if(map!=null)
this.putAll(map);
else if(this.size()==0)
return null;
return this;
}
public boolean needPage()
{
return this.keySet().contains("page")||this.keySet().contains("size");
}
public String getDataSource()
{
return this.getStringValue("datasource");
......
......@@ -9,6 +9,7 @@ import org.springframework.util.ObjectUtils;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class RequestData<T> extends BaseData
{
......@@ -18,7 +19,14 @@ public class RequestData<T> extends BaseData
return this;
}
public RequestData setAll(Map map)
{
if(map!=null)
this.putAll(map);
else if(this.size()==0)
return null;
return this;
}
public RequestData setKey(Object key)
{
......
package cn.ibizlab.core.util.config;
import cn.ibizlab.core.data.dto.BaseData;
import cn.ibizlab.core.data.dto.FilterData;
import cn.ibizlab.core.data.filter.SearchContextBase;
import com.fasterxml.jackson.databind.ObjectMapper;
......@@ -26,8 +27,10 @@ public class FilterDataResolver implements HandlerMethodArgumentResolver {
@Override
public boolean supportsParameter(MethodParameter parameter) {
return SearchContextBase.class.isAssignableFrom(parameter.getParameterType())
|| FilterData.class.isAssignableFrom(parameter.getParameterType());
Class<?> type = parameter.getParameterType();
return SearchContextBase.class==type
|| FilterData.class==type
|| BaseData.class==type;
}
@Override
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册