java递归查询数据

public String idsStr(Integer fid){
String ids="";
String ids1="";
String hql="from PlatformUser where isDelete=2 and fatherId="+fid;
List users=baseDao.queryHQL(hql);
if(users.size()>0){
for (int i = 0; i < users.size();i++) {
ids+=users.get(i).getId()+",";
ids1=idsStr(users.get(i).getId());
ids+=ids1;
}
}
return ids;
}

你可能感兴趣的:(java递归查询数据)