如下所示:
 @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<String> list= jdbcTemplate.queryForList(sql, String.class);     if(list!=null&&list.size()>0){       for(int i=0;i<list.size();i++){         str = getEmployeeBysupSelas(list.get(i), str);       }     }     return str;   } 以上就是小編為大家帶來的Java無限級樹(遞歸)超實用案例全部內容了,希望大家多多支持武林網~
新聞熱點
疑難解答