以下に示すように:
@Override public String getemployeebysup(string EmployeeId){string str = ""; str = getemployeeebysupselas(employee、str); return str.substring(0、str.lastindexof( "、")); } @Override public string getemployeebysupselas(String EmployeeId、String str){str+= "'"+employed+"' '、"; System.out.println(str); string sql = "select u.employeid from tbl_system_user u where supervisorid = '"+employeid+"'"; 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 Infinite Tree(再帰)超実用的なケースの完全な内容です。誰もがwulin.comをもっとサポートすることを願っています〜