feat(uapbd): 添加默认分页参数
- 当 pageInfo 为空时,添加默认的分页参数 - 设置默认的 pageIndex 为 0,pageSize 为 10
This commit is contained in:
parent
2130d2dbf7
commit
6b2a1ccb0e
|
@ -39,7 +39,13 @@ public class QuerySync extends AbstractNCCRestResource {
|
||||||
Map<String, Object> data = apiUfinterface.getData().getParamdata();
|
Map<String, Object> data = apiUfinterface.getData().getParamdata();
|
||||||
JSONObject pageInfo = (JSONObject) JSONObject.toJSON(apiUfinterface.getPageInfo());
|
JSONObject pageInfo = (JSONObject) JSONObject.toJSON(apiUfinterface.getPageInfo());
|
||||||
data.remove("type"); // 移除类型参数,因为它仅用于路由,向下传递会影响查询
|
data.remove("type"); // 移除类型参数,因为它仅用于路由,向下传递会影响查询
|
||||||
|
|
||||||
|
if (pageInfo == null) {
|
||||||
|
pageInfo = new JSONObject();
|
||||||
|
pageInfo.put("pageIndex", "0");
|
||||||
|
pageInfo.put("pageSize", "10");
|
||||||
|
}// 默认分页
|
||||||
|
|
||||||
// 获取额外条件
|
// 获取额外条件
|
||||||
String extraCondition = null;
|
String extraCondition = null;
|
||||||
if (data.containsKey("extraCondition")) {
|
if (data.containsKey("extraCondition")) {
|
||||||
|
|
Loading…
Reference in New Issue