import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnore;
/**
* @ClassName:Query
* @Description: 分页参数
*/
public class Query implements Serializable {
private static final long serialVersionUID = -5782060281783635814L;
/**
* 页码
*/
public String page = "1";
/**
* 条数
*/
public String limit = "10";
/**
* 排序字段
*/
public String orderByField = "";
/**
* 排序
*/
public String isAsc = "";
/**
* 请求参数
*/
@JsonIgnore
private String params;
/**
* 机台list
*/
private List<String> machineList;
public List<String> getMachineList() {
return machineList;
}
public void setMachineList(List<String> machineList) {
this.machineList = machineList;
}
public Integer getPage() {
return Integer.parseInt( page );
}
public void setPage(String page) {
this.page = page;
}
public Integer getLimit() {
return Integer.parseInt( limit );
}
public void setLimit(String limit) {
this.limit = limit;
}
public String getOrderByField() {
return orderByField;
}
public void setOrderByField(String orderByField) {
this.orderByField = orderByField;
}
public String getIsAsc() {
return isAsc;
}
public void setIsAsc(String isAsc) {
this.isAsc = isAsc;
}
public Map<String, Object> getParams() {
if (params == null) {
return new HashMap<>();
}
return JSONObject.parseObject( params, Map.class );
}
public void setParams(String params) {
this.params = params;
}
}
封装前台查询对象(Query对象)
最新推荐文章于 2024-04-08 09:33:10 发布