@Test public void getUserByUserName() throws Exception { LoginUser loginUser1 = loginUserDao.getUserByUserName("zhaodong"); System.out.println("getUserByNo :-------> " + loginUser1); Assert.assertTrue(loginUser1 != null); }
public LoginUser getUserByUserName(String userName) throws SQLException { LoginUser loginUser = new LoginUser(); loginUser.setUserName(userName); List<LoginUser> list = this.getDasClient().queryBySample(loginUser); return CollectionUtils.isNotEmpty(list) ? list.get(0) : null; }
LoginUserDao extends BaseDao { public LoginUser getUserByUserName(String userName) throws SQLException { LoginUser loginUser = new LoginUser(); loginUser.setUserName(userName); List<LoginUser> list = this.getDasClient().queryBySample(loginUser); return CollectionUtils.isNotEmpty(list) ? list.get(0) : null; } }
LoginUserDao extends BaseDao { public LoginUser getUserByUserName(String userName) throws SQLException { LoginUser loginUser = new LoginUser(); loginUser.setUserName(userName); List<LoginUser> list = this.getDasClient().queryBySample(loginUser); return CollectionUtils.isNotEmpty(list) ? list.get(0) : null; }  }
LoginUserDao extends BaseDao { public LoginUser getUserByUserName(String userName) throws SQLException { LoginUser loginUser = new LoginUser(); loginUser.setUserName(userName); List<LoginUser> list = this.getDasClient().queryBySample(loginUser); return CollectionUtils.isNotEmpty(list) ? list.get(0) : null; }  Long insertUser(LoginUser user); int initAdmin(LoginUser user); int updateUserPassword(LoginUser user); List<LoginUser> getAllUsers(); LoginUser getUserById(Long userId); LoginUser getUserByNo(String userNo); LoginUser getUserByUserName(String userName); List<LoginUsersView> getUserByGroupId(Long groupId); int updateUser(LoginUser user); int deleteUser(Long userId); Long getTotalCount(Paging<LoginUser> paging); List<LoginUserView> findUserPageList(Paging<LoginUser> paging); }
LoginUserDao extends BaseDao { public LoginUser getUserByUserName(String userName) throws SQLException { LoginUser loginUser = new LoginUser(); loginUser.setUserName(userName); List<LoginUser> list = this.getDasClient().queryBySample(loginUser); return CollectionUtils.isNotEmpty(list) ? list.get(0) : null; }  Long insertUser(LoginUser user); int initAdmin(LoginUser user); int updateUserPassword(LoginUser user); List<LoginUser> getAllUsers(); LoginUser getUserById(Long userId); LoginUser getUserByNo(String userNo); LoginUser getUserByUserName(String userName); List<LoginUsersView> getUserByGroupId(Long groupId); int updateUser(LoginUser user); int deleteUser(Long userId); Long getTotalCount(Paging<LoginUser> paging); List<LoginUserView> findUserPageList(Paging<LoginUser> paging);  }