添加分页功能

liujun-2024-05-23-接口漏洞修复
liujun 2024-04-13 10:59:30 +08:00
parent 7136bb9a37
commit 92dabf2a7c
1 changed files with 8 additions and 2 deletions

View File

@ -25,9 +25,12 @@ public class DwController extends BaseController {
} }
@RequestMapping(value = "getMapList") @RequestMapping(value = "getMapList")
public Object getMapList() throws Exception { public Object getMapList(Page page) throws Exception {
PageData pd = this.getPageData(); PageData pd = this.getPageData();
MapGet mapGet = JSONObject.parseObject(JSONObject.toJSONString(pd), MapGet.class); MapGet mapGet = JSONObject.parseObject(JSONObject.toJSONString(pd), MapGet.class);
mapGet.getPage().setPage(page.getPage());
mapGet.getPage().setCurrent(page.getCurrent());
mapGet.getPage().setSize(page.getSize());
return dwService.getMapList(mapGet); return dwService.getMapList(mapGet);
} }
@ -39,9 +42,12 @@ public class DwController extends BaseController {
} }
@RequestMapping(value = "getAlarmList") @RequestMapping(value = "getAlarmList")
public Object getAlarmList() throws Exception { public Object getAlarmList(Page page) throws Exception {
PageData pd = this.getPageData(); PageData pd = this.getPageData();
AlarmGet mapGet = JSONObject.parseObject(JSONObject.toJSONString(pd), AlarmGet.class); AlarmGet mapGet = JSONObject.parseObject(JSONObject.toJSONString(pd), AlarmGet.class);
mapGet.getPage().setPage(page.getPage());
mapGet.getPage().setCurrent(page.getCurrent());
mapGet.getPage().setSize(page.getSize());
return dwService.getAlarmList(mapGet); return dwService.getAlarmList(mapGet);
} }