@Test public void findServerPageListTest() throws SQLException { Paging<Server> paging = new Paging<>(); paging.setData(new Server()); Assert.assertTrue(serverService.findServerPageList(paging).getList().size() > 0); }
public ListResult<ServerView> findServerPageList(Paging<Server> paging) throws SQLException { Long count = serverDao.getServerTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<ServerView> list = serverDao.findServerPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }
ServerService { public ListResult<ServerView> findServerPageList(Paging<Server> paging) throws SQLException { Long count = serverDao.getServerTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<ServerView> list = serverDao.findServerPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); } }
ServerService { public ListResult<ServerView> findServerPageList(Paging<Server> paging) throws SQLException { Long count = serverDao.getServerTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<ServerView> list = serverDao.findServerPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  }
ServerService { public ListResult<ServerView> findServerPageList(Paging<Server> paging) throws SQLException { Long count = serverDao.getServerTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<ServerView> list = serverDao.findServerPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  ValidatorChain validatePermision(LoginUser user, Errors errors); ListResult<ServerView> findServerPageList(Paging<Server> paging); ServiceResult insertServer(Server server); ServiceResult<String> deleteServer(Server server); ServiceResult<String> addDataCenter(LoginUser user, Server server); ServiceResult<String> updateDataCenter(LoginUser user, Server server); ServiceResult<String> deleteDataCenter(LoginUser user, Server server); ServiceResult<String> syncDataCenter(LoginUser user, Server server); List<ConfigDataResponse> getCheckData(LoginUser user, Server server); }
ServerService { public ListResult<ServerView> findServerPageList(Paging<Server> paging) throws SQLException { Long count = serverDao.getServerTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<ServerView> list = serverDao.findServerPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  ValidatorChain validatePermision(LoginUser user, Errors errors); ListResult<ServerView> findServerPageList(Paging<Server> paging); ServiceResult insertServer(Server server); ServiceResult<String> deleteServer(Server server); ServiceResult<String> addDataCenter(LoginUser user, Server server); ServiceResult<String> updateDataCenter(LoginUser user, Server server); ServiceResult<String> deleteDataCenter(LoginUser user, Server server); ServiceResult<String> syncDataCenter(LoginUser user, Server server); List<ConfigDataResponse> getCheckData(LoginUser user, Server server);  }