Como se muestra a continuación:
@Override public String getEmployeBySup (String EmployeEd) {String str = ""; str = getEmployeEbySupselas (EmployeeId, Str); return str.substring (0, str.lastindexof (",")); } @Override public String getEmloyeBySupselas (String EmployeEd, String Str) {str+= "'"+EmployeeId+"',"; System.out.println (str); String sql = "Seleccione U.EmployeeId de tbl_system_user u where supervisorId = '"+empleadoD+"'"; List <String> list = jdbctemplate.queryForList (sql, string.class); if (list! = null && list.size ()> 0) {for (int i = 0; i <list.size (); i ++) {str = getEmloyeebySupselas (list.get (i), str); }} return str; }Lo anterior es el contenido completo del caso súper práctico de Java Infinite Tree (Recursion) que le presenta el editor. Espero que todos apoyen a Wulin.com más ~