@Test public void getUserByGroupId() throws Exception { List<LoginUsersView> list = loginUserDao.getUserByGroupId(1L); System.out.println("getUserByGroupId :-------> " + list); Assert.assertTrue(list.size() > 0); }
public List<LoginUsersView> getUserByGroupId(Long groupId) throws SQLException { String sql = "SELECT t2.id, t2.user_no, t2.user_name, t2.user_real_name, t2.user_email, t2.password, t1.role, t1.opt_user FROM user_group t1 inner JOIN login_users t2 ON t1.user_id = t2.id WHERE t1.group_id = ?"; return this.queryBySql(sql, LoginUsersView.class, Parameter.integerOf(StringUtils.EMPTY, groupId)); }
LoginUserDao extends BaseDao { public List<LoginUsersView> getUserByGroupId(Long groupId) throws SQLException { String sql = "SELECT t2.id, t2.user_no, t2.user_name, t2.user_real_name, t2.user_email, t2.password, t1.role, t1.opt_user FROM user_group t1 inner JOIN login_users t2 ON t1.user_id = t2.id WHERE t1.group_id = ?"; return this.queryBySql(sql, LoginUsersView.class, Parameter.integerOf(StringUtils.EMPTY, groupId)); } }
LoginUserDao extends BaseDao { public List<LoginUsersView> getUserByGroupId(Long groupId) throws SQLException { String sql = "SELECT t2.id, t2.user_no, t2.user_name, t2.user_real_name, t2.user_email, t2.password, t1.role, t1.opt_user FROM user_group t1 inner JOIN login_users t2 ON t1.user_id = t2.id WHERE t1.group_id = ?"; return this.queryBySql(sql, LoginUsersView.class, Parameter.integerOf(StringUtils.EMPTY, groupId)); }  }
LoginUserDao extends BaseDao { public List<LoginUsersView> getUserByGroupId(Long groupId) throws SQLException { String sql = "SELECT t2.id, t2.user_no, t2.user_name, t2.user_real_name, t2.user_email, t2.password, t1.role, t1.opt_user FROM user_group t1 inner JOIN login_users t2 ON t1.user_id = t2.id WHERE t1.group_id = ?"; return this.queryBySql(sql, LoginUsersView.class, Parameter.integerOf(StringUtils.EMPTY, groupId)); }  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 List<LoginUsersView> getUserByGroupId(Long groupId) throws SQLException { String sql = "SELECT t2.id, t2.user_no, t2.user_name, t2.user_real_name, t2.user_email, t2.password, t1.role, t1.opt_user FROM user_group t1 inner JOIN login_users t2 ON t1.user_id = t2.id WHERE t1.group_id = ?"; return this.queryBySql(sql, LoginUsersView.class, Parameter.integerOf(StringUtils.EMPTY, groupId)); }  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);  }