feat(uapbd): 添加默认分页参数

- 当 pageInfo 为空时,添加默认的分页参数
- 设置默认的 pageIndex 为 0,pageSize 为 10
This commit is contained in:
张明 2025-05-13 14:38:22 +08:00
parent 265f42953f
commit d87ab247a0
1 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,12 @@ public class QuerySync extends AbstractNCCRestResource {
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")) {