@Test public void findUserPageListTest() throws SQLException { Paging<LoginUser> paging = new Paging<>(); paging.setData(new LoginUser()); Assert.assertTrue(userService.findUserPageList(paging).getList().size() > 0); }
public ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging) throws SQLException { Long count = loginUserDao.getTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<LoginUserView> list = loginUserDao.findUserPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }
UserService { public ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging) throws SQLException { Long count = loginUserDao.getTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<LoginUserView> list = loginUserDao.findUserPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); } }
UserService { public ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging) throws SQLException { Long count = loginUserDao.getTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<LoginUserView> list = loginUserDao.findUserPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  }
UserService { public ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging) throws SQLException { Long count = loginUserDao.getTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<LoginUserView> list = loginUserDao.findUserPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean canUpdateOrDeleteUser(LoginUser currentUser, LoginUser newUser); boolean canUpdateOrDeleteUser(Long userId, Integer userRole, Long newUserId, Integer newUserRole); boolean addUser(LoginUser user); boolean update(LoginUser user); ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging); boolean initAdminInfo(LoginUser user); boolean register(LoginUser user); ServiceResult<LoginUser> getUserInfoByWorkName(LoginUser user, String name); ServiceResult getUserManageButton(LoginUser user); }
UserService { public ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging) throws SQLException { Long count = loginUserDao.getTotalCount(paging); return PagerUtil.find(count, paging.getPage(), paging.getPageSize(), () -> { List<LoginUserView> list = loginUserDao.findUserPageList(paging); if (CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } return list; }); }  ValidatorChain validatePermision(LoginUser user, Errors errors); boolean canUpdateOrDeleteUser(LoginUser currentUser, LoginUser newUser); boolean canUpdateOrDeleteUser(Long userId, Integer userRole, Long newUserId, Integer newUserRole); boolean addUser(LoginUser user); boolean update(LoginUser user); ListResult<LoginUserView> findUserPageList(Paging<LoginUser> paging); boolean initAdminInfo(LoginUser user); boolean register(LoginUser user); ServiceResult<LoginUser> getUserInfoByWorkName(LoginUser user, String name); ServiceResult getUserManageButton(LoginUser user);  }