Authored by zhengyouwei

zookeep tree

... ... @@ -60,12 +60,7 @@ public class ZkMonitorCtrl {
if(list==null){
return new BaseResponse<PageResponse<ZkConfig>>();
}
PageResponse<ZkConfig> response = new PageResponse<ZkConfig>();
response.setCurrentPage(list.getCurrentPage());
response.setRows(list.getRows());
response.setPageSize(list.getPageSize());
response.setTotal(list.getTotal());
return new BaseResponse<PageResponse<ZkConfig>>(response);
return new BaseResponse<PageResponse<ZkConfig>>(list);
}
/**
... ... @@ -82,12 +77,7 @@ public class ZkMonitorCtrl {
if(list==null){
return new BaseResponse<PageResponse<ZkConfigAll>>();
}
PageResponse<ZkConfigAll> response = new PageResponse<ZkConfigAll>();
response.setCurrentPage(list.getCurrentPage());
response.setRows(list.getRows());
response.setPageSize(list.getPageSize());
response.setTotal(list.getTotal());
return new BaseResponse<PageResponse<ZkConfigAll>>(response);
return new BaseResponse<PageResponse<ZkConfigAll>>(list);
}
/**
... ...
... ... @@ -147,11 +147,6 @@ public class ZkMoitorServiceImpl implements IZkMoitorService {
zk.getCurrentPage();
page++;
}
if (list.size()>10&&req.getCurrentPage()*10<list.size()) {
list=list.subList(req.getCurrentPage()*10-10, req.getCurrentPage()*10);
}else if (req.getCurrentPage()*10>list.size()) {
list=list.subList(req.getCurrentPage()*10-10, list.size());
}
response.setCurrentPage(req.getCurrentPage());
response.setPageSize(req.getPageSize());
response.setTotal(page);
... ...