Java MySQL无限级树(递归)超实用

     @Override
    public String getEmployeeBysup(String employeeID) {
        String str="";
        str = getEmployeeBysupSelas(employeeID,  str);
        return str.substring(0, str.lastIndexOf(","));
    }
    @Override
    public String getEmployeeBysupSelas(String employeeID, String str) {
        str+="'"+employeeID+"',";
        System.out.println(str);
        String sql="SELECT u.employeeID from tbl_system_user u where supervisorID='"+employeeID+"'";
        List list= jdbcTemplate.queryForList(sql, String.class);
        if(list!=null&&list.size()>0){
            for(int i=0;i

你可能感兴趣的:(java)